Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1083)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h

Issue 1643573002: Add a ModuleLoadAnalyzer which checks modules against a whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-update'd Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI CE_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI CE_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI CE_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SERVI CE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Returns a preference validation delegate that adds incidents to the service 91 // Returns a preference validation delegate that adds incidents to the service
92 // for validation failures in |profile|. The delegate may outlive the service, 92 // for validation failures in |profile|. The delegate may outlive the service,
93 // but incidents reported by it will no longer have any effect after the 93 // but incidents reported by it will no longer have any effect after the
94 // service is deleted. 94 // service is deleted.
95 scoped_ptr<TrackedPreferenceValidationDelegate> 95 scoped_ptr<TrackedPreferenceValidationDelegate>
96 CreatePreferenceValidationDelegate(Profile* profile); 96 CreatePreferenceValidationDelegate(Profile* profile);
97 97
98 // Registers |callback| to be run after some delay following process launch. 98 // Registers |callback| to be run after some delay following process launch.
99 void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback); 99 void RegisterDelayedAnalysisCallback(const DelayedAnalysisCallback& callback);
100 100
101 // Registers |callback| to be run after some delay following process launch if
102 // a profile participating in extended reporting is found.
103 void RegisterExtendedReportingOnlyDelayedAnalysisCallback(
104 const DelayedAnalysisCallback& callback);
105
101 // Adds |download_manager| to the set monitored for client download request 106 // Adds |download_manager| to the set monitored for client download request
102 // storage. 107 // storage.
103 void AddDownloadManager(content::DownloadManager* download_manager); 108 void AddDownloadManager(content::DownloadManager* download_manager);
104 109
105 protected: 110 protected:
106 // A pointer to a function that populates a protobuf with environment data. 111 // A pointer to a function that populates a protobuf with environment data.
107 typedef void (*CollectEnvironmentDataFn)( 112 typedef void (*CollectEnvironmentDataFn)(
108 ClientIncidentReport_EnvironmentData*); 113 ClientIncidentReport_EnvironmentData*);
109 114
110 // For testing so that the TaskRunner used for delayed analysis callbacks can 115 // For testing so that the TaskRunner used for delayed analysis callbacks can
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // The time at which download collection was initiated. 331 // The time at which download collection was initiated.
327 base::TimeTicks last_download_begin_; 332 base::TimeTicks last_download_begin_;
328 333
329 // Context data for all on-the-record profiles plus the process-wide (NULL) 334 // Context data for all on-the-record profiles plus the process-wide (NULL)
330 // context. 335 // context.
331 ProfileContextCollection profiles_; 336 ProfileContextCollection profiles_;
332 337
333 // Callbacks registered for performing delayed analysis. 338 // Callbacks registered for performing delayed analysis.
334 DelayedCallbackRunner delayed_analysis_callbacks_; 339 DelayedCallbackRunner delayed_analysis_callbacks_;
335 340
341 // Callbacks registered for performing delayed analysis that should only
342 // be executed for safebrowsing extended reporting users.
343 DelayedCallbackRunner extended_reporting_only_delayed_analysis_callbacks_;
344
336 DownloadMetadataManager download_metadata_manager_; 345 DownloadMetadataManager download_metadata_manager_;
337 346
338 // The collection of uploads in progress. 347 // The collection of uploads in progress.
339 std::vector<scoped_ptr<UploadContext>> uploads_; 348 std::vector<scoped_ptr<UploadContext>> uploads_;
340 349
341 // An object that asynchronously searches for the most recent binary download. 350 // An object that asynchronously searches for the most recent binary download.
342 // Non-NULL while such a search is outstanding. 351 // Non-NULL while such a search is outstanding.
343 scoped_ptr<LastDownloadFinder> last_download_finder_; 352 scoped_ptr<LastDownloadFinder> last_download_finder_;
344 353
345 // True if IncidentReportingService is enabled at the process level, by a 354 // True if IncidentReportingService is enabled at the process level, by a
346 // field trial. 355 // field trial.
347 bool enabled_by_field_trial_; 356 bool enabled_by_field_trial_;
348 357
349 // A factory for handing out weak pointers for IncidentReceiver objects. 358 // A factory for handing out weak pointers for IncidentReceiver objects.
350 base::WeakPtrFactory<IncidentReportingService> receiver_weak_ptr_factory_; 359 base::WeakPtrFactory<IncidentReportingService> receiver_weak_ptr_factory_;
351 360
352 // A factory for handing out weak pointers for internal asynchronous tasks 361 // A factory for handing out weak pointers for internal asynchronous tasks
353 // that are posted during normal processing (e.g., environment collection, 362 // that are posted during normal processing (e.g., environment collection,
354 // safe browsing database checks, and report uploads). 363 // safe browsing database checks, and report uploads).
355 base::WeakPtrFactory<IncidentReportingService> weak_ptr_factory_; 364 base::WeakPtrFactory<IncidentReportingService> weak_ptr_factory_;
356 365
357 DISALLOW_COPY_AND_ASSIGN(IncidentReportingService); 366 DISALLOW_COPY_AND_ASSIGN(IncidentReportingService);
358 }; 367 };
359 368
360 } // namespace safe_browsing 369 } // namespace safe_browsing
361 370
362 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SE RVICE_H_ 371 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_INCIDENT_REPORTING_SE RVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698