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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 2719833002: Convert TrackedPreferenceValidationDelegate into a mojo interface. (Closed)
Patch Set: rebase Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
36 #include "chrome/common/safe_browsing/file_type_policies.h" 36 #include "chrome/common/safe_browsing/file_type_policies.h"
37 #include "components/prefs/pref_change_registrar.h" 37 #include "components/prefs/pref_change_registrar.h"
38 #include "components/prefs/pref_service.h" 38 #include "components/prefs/pref_service.h"
39 #include "components/safe_browsing/common/safebrowsing_constants.h" 39 #include "components/safe_browsing/common/safebrowsing_constants.h"
40 #include "components/safe_browsing/common/safebrowsing_switches.h" 40 #include "components/safe_browsing/common/safebrowsing_switches.h"
41 #include "components/safe_browsing_db/database_manager.h" 41 #include "components/safe_browsing_db/database_manager.h"
42 #include "components/safe_browsing_db/v4_feature_list.h" 42 #include "components/safe_browsing_db/v4_feature_list.h"
43 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h" 43 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h"
44 #include "components/safe_browsing_db/v4_local_database_manager.h" 44 #include "components/safe_browsing_db/v4_local_database_manager.h"
45 #include "components/user_prefs/tracked/tracked_preference_validation_delegate.h "
46 #include "content/public/browser/browser_thread.h" 45 #include "content/public/browser/browser_thread.h"
47 #include "content/public/browser/cookie_store_factory.h" 46 #include "content/public/browser/cookie_store_factory.h"
48 #include "content/public/browser/notification_service.h" 47 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/resource_request_info.h" 48 #include "content/public/browser/resource_request_info.h"
50 #include "google_apis/google_api_keys.h" 49 #include "google_apis/google_api_keys.h"
51 #include "net/cookies/cookie_store.h" 50 #include "net/cookies/cookie_store.h"
52 #include "net/extras/sqlite/cookie_crypto_delegate.h" 51 #include "net/extras/sqlite/cookie_crypto_delegate.h"
53 #include "net/extras/sqlite/sqlite_channel_id_store.h" 52 #include "net/extras/sqlite/sqlite_channel_id_store.h"
54 #include "net/http/http_network_layer.h" 53 #include "net/http/http_network_layer.h"
55 #include "net/http/http_transaction_factory.h" 54 #include "net/http/http_transaction_factory.h"
56 #include "net/ssl/channel_id_service.h" 55 #include "net/ssl/channel_id_service.h"
57 #include "net/ssl/default_channel_id_store.h" 56 #include "net/ssl/default_channel_id_store.h"
58 #include "net/url_request/url_request_context.h" 57 #include "net/url_request/url_request_context.h"
59 #include "net/url_request/url_request_context_getter.h" 58 #include "net/url_request/url_request_context_getter.h"
59 #include "services/preferences/public/interfaces/tracked_preference_validation_d elegate.mojom.h"
60 60
61 #if defined(OS_WIN) 61 #if defined(OS_WIN)
62 #include "chrome/installer/util/browser_distribution.h" 62 #include "chrome/installer/util/browser_distribution.h"
63 #endif 63 #endif
64 64
65 #if defined(SAFE_BROWSING_DB_LOCAL) 65 #if defined(SAFE_BROWSING_DB_LOCAL)
66 #include "chrome/browser/safe_browsing/local_database_manager.h" 66 #include "chrome/browser/safe_browsing/local_database_manager.h"
67 #elif defined(SAFE_BROWSING_DB_REMOTE) 67 #elif defined(SAFE_BROWSING_DB_REMOTE)
68 #include "components/safe_browsing_db/remote_database_manager.h" 68 #include "components/safe_browsing_db/remote_database_manager.h"
69 #endif 69 #endif
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 SafeBrowsingPingManager* SafeBrowsingService::ping_manager() const { 440 SafeBrowsingPingManager* SafeBrowsingService::ping_manager() const {
441 DCHECK_CURRENTLY_ON(BrowserThread::IO); 441 DCHECK_CURRENTLY_ON(BrowserThread::IO);
442 return ping_manager_.get(); 442 return ping_manager_.get();
443 } 443 }
444 444
445 const scoped_refptr<SafeBrowsingDatabaseManager>& 445 const scoped_refptr<SafeBrowsingDatabaseManager>&
446 SafeBrowsingService::v4_local_database_manager() const { 446 SafeBrowsingService::v4_local_database_manager() const {
447 return services_delegate_->v4_local_database_manager(); 447 return services_delegate_->v4_local_database_manager();
448 } 448 }
449 449
450 std::unique_ptr<TrackedPreferenceValidationDelegate> 450 std::unique_ptr<prefs::mojom::TrackedPreferenceValidationDelegate>
451 SafeBrowsingService::CreatePreferenceValidationDelegate( 451 SafeBrowsingService::CreatePreferenceValidationDelegate(
452 Profile* profile) const { 452 Profile* profile) const {
453 return services_delegate_->CreatePreferenceValidationDelegate(profile); 453 return services_delegate_->CreatePreferenceValidationDelegate(profile);
454 } 454 }
455 455
456 void SafeBrowsingService::RegisterDelayedAnalysisCallback( 456 void SafeBrowsingService::RegisterDelayedAnalysisCallback(
457 const DelayedAnalysisCallback& callback) { 457 const DelayedAnalysisCallback& callback) {
458 services_delegate_->RegisterDelayedAnalysisCallback(callback); 458 services_delegate_->RegisterDelayedAnalysisCallback(callback);
459 } 459 }
460 460
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 ping_manager()->ReportThreatDetails(report); 757 ping_manager()->ReportThreatDetails(report);
758 } 758 }
759 759
760 void SafeBrowsingService::ProcessResourceRequest( 760 void SafeBrowsingService::ProcessResourceRequest(
761 const ResourceRequestInfo& request) { 761 const ResourceRequestInfo& request) {
762 DCHECK_CURRENTLY_ON(BrowserThread::UI); 762 DCHECK_CURRENTLY_ON(BrowserThread::UI);
763 services_delegate_->ProcessResourceRequest(&request); 763 services_delegate_->ProcessResourceRequest(&request);
764 } 764 }
765 765
766 } // namespace safe_browsing 766 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698