Commit Graph

107 Commits

Author SHA1 Message Date
Thomas Nguyen
15682486c6 Bug 1358333 - Fix APPLICATION_REPUTATION_ALLOWLIST_MATCH and APPLICATION_REPUTATION_BLOCKLIST_MATCH telemetry r=francois
MozReview-Commit-ID: DbI0uNdEwZ8
2017-04-21 11:18:34 +08:00
Francois Marier
d593f1e244 Bug 1354713 - Make use of the application reputation allow list on OSX and Linux. r=gcp
Since the allow list contains both hostnames and certificate hashes, it makes sense
to use it on all platforms.

MozReview-Commit-ID: 1icRFYhhnAY
2017-04-07 16:07:41 -07:00
Zibi Braniecki
8c433fc56a Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK
2017-03-11 18:43:11 -08:00
Sebastian Hengst
017c2ee2bf Backed out changeset 60d72c2dd49d (bug 1346616) for eslint failure in DirectoryLinksProvider.jsm. r=backout on a CLOSED TREE 2017-04-18 00:48:16 +02:00
Zibi Braniecki
64bae2dccf Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales. r=jfkthame,Pike
I'm adding a helper function mozILocaleService::GetRequestedLocale to simplify
most of the callsites that are looking for the first of the requested locales.

In most cases, I'm just matching the behavior of the code with reusing
LocaleService API instead of direct manipulation on the prefs.
That includes how I handle error case scenarios.

In case of sdk/l10n/locale.js I am reusing LocaleService heuristics over
the custom one from the file since the ones in LocaleService are just
more correct and unified accross the whole platform.

In case of FallbackEncoding I have to turn it into a nsIObserver to listen
to intl:requested-locales-changed.

MozReview-Commit-ID: 7rOr2CovLK
2017-03-11 18:43:11 -08:00
David Major
b1e362f6f7 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN
2017-03-06 17:52:54 +13:00
Thomas Nguyen
d107e3566b Bug 1331139 - Enable download protection for V4 lists. r=francois
MozReview-Commit-ID: 8IHKGvXQjPt
2017-02-27 12:18:33 +08:00
Thomas Nguyen
882486b2dc Bug 1336240 - Remove observer in PendingLookup and nsChannelClassifier r=dimi,francois
MozReview-Commit-ID: EBQpQzESVZP
2017-02-24 10:14:07 +08:00
Tom Tromey
a4b717ab39 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs
2016-12-15 20:16:31 -07:00
David Major
b148a2518f Bug 1338947: Add const to kBinaryFileExtensions. r=gcp
MozReview-Commit-ID: 5le3q56JRms
2017-02-14 15:24:55 +13:00
Cykesiopka
e99d55a74b Bug 1331983 - Avoid non-smart string IDL types in nsIX509CertDB.idl. r=gcp,keeler,nwgh
Smart string classes like nsCString are safer to use than raw |char*| strings,
and are typically easier to deal with as well.

MozReview-Commit-ID: 2PdrCa6cbpe
2017-02-09 23:11:29 +08:00
Andrea Marchesini
46a9207d60 Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
dimi
d2fb140df2 Bug 1320402 - Move url-classifier off of using appIds. r=ehsan, gcp
MozReview-Commit-ID: IqnAVrv2c9W
2017-01-03 14:21:58 +08:00
Thomas Nguyen
7064eed520 Bug 1315386 - Make Safe Browsing code more shutdown-aware. r=francois,gcp.
MozReview-Commit-ID: ATCVfh5YLZl
2016-11-25 16:02:37 +08:00
Nathan Froyd
8a9bd5755c Bug 1316642 - convert giant logical OR expression in IsBinaryFile into a for loop; r=gcp
The giant logical OR expression was causing GCC on x86-64 to churn out a
200K function, which is completely unnecessary.  This revised
formulation is not maximally efficient, but it is a massive improvement
size-wise: IsBinaryFile + the table is about 2K on x86-64.
2016-11-11 01:00:11 -05:00
Francois Marier
0a7382402b Bug 1302211 - Sync file extension list with Chrome. r=gcp
Directly executable file types were added and types that Chrome
doesn't submit to the remote server were removed.

PDF is retained for now and many archive types are commented-out.

https://cs.chromium.org/chromium/src/chrome/browser/resources/safe_browsing/download_file_types.asciipb

MozReview-Commit-ID: 3lXUX9NV4Fw
2016-09-12 15:58:44 -07:00
Francois Marier
b6cfd4500e Bug 1302211 - Remove .osx extension from download protection. r=gcp
https://bugs.chromium.org/p/chromium/issues/detail?id=641614

MozReview-Commit-ID: 6m3bKNlnjIv
2016-09-12 13:23:25 -07:00
Michael Layzell
419868d357 Bug 1018486 - Part 9: Changes to account for modifications to clang plugin, r=ehsan
MozReview-Commit-ID: EPQMbfHYxUK
2016-09-07 10:50:47 -04:00
Yoshi Huang
a470396744 Bug 1244340 - Part 1: Use origin attributes as cstor arg for LoadContext r=sicking 2016-08-26 18:59:00 +08:00
Francois Marier
182aac11ab Bug 1296472 - Move upstream chromium code into chromium directory. r=gcp
MozReview-Commit-ID: 3bjPtqtQlGb
2016-08-18 15:50:09 -07:00
Nicholas Nethercote
8f3c6e7c32 Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.
2016-08-12 17:36:22 +10:00
Francois Marier
88ba1518b7 Bug 1291472 - Add more application reputation extensions. r=gcp
MozReview-Commit-ID: EKXupjU5JG4
2016-08-05 16:56:46 -07:00
Thomas Nguyen
c623867e82 Bug 1172689 - Add telemetry for application reputation remote lookup timeouts. r=francois
MozReview-Commit-ID: GrmNPGGcOE5
2016-07-21 10:05:02 +08:00
Ralph Giles
3d546266d0 Bug 1275744 - Reference MOZ_LOG in toolkit comments. r=erahm
NSPR_LOG_MODULES is deprecated.

MozReview-Commit-ID: 2iZFe60Uxvi
2016-05-26 11:14:47 -07:00
Dragana Damjanovic
1080454580 Bug 1125916 - Fix code that miss proper flags and originAttributes in LoadInfo. Also fix some tests. r=sicking, r=jduell 2016-04-13 15:34:36 +02:00
Paolo Amadini
7af901eb8d Bug 1254100 - Part 1 - Fix compilation error in debug builds. r=gcp,francois 2016-03-20 16:11:52 +00:00
Paolo Amadini
a022994a44 Bug 1254100 - Part 1 - The Application Reputation interface should provide information about the verdict. r=gcp,francois
MozReview-Commit-ID: 2qpg7297NUB
2016-03-20 13:54:11 +00:00
sajitk
39f5ab0cca Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in toolkit subdirectory.r=erahm 2016-01-28 10:37:00 -08:00
Francois Marier
3d4c8314bb Bug 1237856 - Add prefs to honor/ignore Application Reputation verdicts. r=gcp 2016-02-02 15:07:06 -05:00
Wes Kocher
3c9e45e1fb Backed out changeset 24af6caa9bba (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE 2016-01-29 10:15:30 -08:00
sajitk
b916ed88a5 Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in toolkit subdirectory. r=erahm 2016-01-28 10:37:00 -05:00
Sylvestre Ledru
1f07806bda Bug 1218816 - Remove useless semicolons. Found by coccinelle. r=Ehsan 2016-01-22 16:58:49 +01:00
Francois Marier
61497c0c01 Bug 1239587 - Rename the browser.safebrowsing.appRepURL pref. r=gcp 2016-01-19 13:56:49 -08:00
Francois Marier
31a12fbe6a Bug 1237370 - Always log the reason for remote AppRep lookup failures. r=gcp 2016-01-18 13:39:00 -08:00
Yoshi Huang
47c69d1edb Bug 1209162 - Create OriginAttributes subtypes. IGNORE IDL r=sicking. 2015-11-03 09:50:54 +08:00
Chris Peterson
9d57db3beb Bug 1218258 - Fix -Wshadow warnings in toolkit/components/downloads. r=paolo
toolkit/components/downloads/ApplicationReputation.cpp:598:14 [-Wshadow] declaration shadows a local variable
toolkit/components/downloads/ApplicationReputation.cpp:721:15 [-Wshadow] declaration shadows a local variable
toolkit/components/downloads/ApplicationReputation.cpp:809:29 [-Wshadow] declaration shadows a local variable
toolkit/components/downloads/nsDownloadManager.cpp:1268:36 [-Wshadow] declaration shadows a local variable
toolkit/components/downloads/nsDownloadManager.cpp:1483:33 [-Wshadow] declaration shadows a local variable
2015-10-19 20:07:52 -07:00
Nathan Froyd
4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Yoshi Huang
d2b4917583 Bug 1165272 - Part 2: replace getNoAppCodebasePrincipal. r=bholley 2015-08-18 15:01:42 +08:00
Bobby Holley
d12b79b75a Backed out 3 changesets (bug 1165272) for b2g sanity blocker. 2015-08-25 11:16:21 -07:00
Yoshi Huang
431a4ee3e8 Bug 1165272 - Part 2: Replace getNoAppCodebasePrincipal. r=bholley 2015-08-24 01:18:00 -04:00
Christoph Kerschbaumer
488ef86cce Bug 1195519 - Use channel->ascynOpen2 toolkit/components/downloads/ApplicationReputation.cpp (r=sicking) 2015-08-18 09:53:47 -07:00
Emanuel Hoogeveen
b30abdc582 Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Francois Marier
ea6b4387c5 Bug 1165816 - Cancel remote application reputation requests after a certain timeout. r=gcp 2015-06-10 17:35:18 +12:00
Eric Rahm
900b3ebc4d Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Eric Rahm
ab32c89747 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:28 -07:00
Carsten "Tomcat" Book
89becff57d Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)
2015-06-02 13:05:56 +02:00
Eric Rahm
f5003d5120 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Eric Rahm
d6adc10d95 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:19 -07:00
Wes Kocher
2a7ed059f1 Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
0baf91e33f Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00