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

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

Issue 2932703003: Plumbing for safe browsing reporting for Android WebView. (Closed)
Patch Set: modify client name to android_webview Created 3 years, 6 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/safe_browsing/incident_reporting/module_load_analyzer.h " 70 #include "chrome/browser/safe_browsing/incident_reporting/module_load_analyzer.h "
71 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec tor.h" 71 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec tor.h"
72 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat ure_analyzer.h" 72 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat ure_analyzer.h"
73 #include "chrome/browser/safe_browsing/protocol_manager.h" 73 #include "chrome/browser/safe_browsing/protocol_manager.h"
74 #endif 74 #endif
75 75
76 using content::BrowserThread; 76 using content::BrowserThread;
77 77
78 namespace safe_browsing { 78 namespace safe_browsing {
79 79
80 namespace {
81
82 // The default URL prefix where browser fetches chunk updates, hashes,
83 // and reports safe browsing hits and malware details.
84 const char kSbDefaultURLPrefix[] =
85 "https://safebrowsing.google.com/safebrowsing";
86
87 // The backup URL prefix used when there are issues establishing a connection
88 // with the server at the primary URL.
89 const char kSbBackupConnectErrorURLPrefix[] =
90 "https://alt1-safebrowsing.google.com/safebrowsing";
91
92 // The backup URL prefix used when there are HTTP-specific issues with the
93 // server at the primary URL.
94 const char kSbBackupHttpErrorURLPrefix[] =
95 "https://alt2-safebrowsing.google.com/safebrowsing";
96
97 // The backup URL prefix used when there are local network specific issues.
98 const char kSbBackupNetworkErrorURLPrefix[] =
99 "https://alt3-safebrowsing.google.com/safebrowsing";
100
101 } // namespace
102
103 // static 80 // static
104 SafeBrowsingServiceFactory* SafeBrowsingService::factory_ = NULL; 81 SafeBrowsingServiceFactory* SafeBrowsingService::factory_ = NULL;
105 82
106 // The default SafeBrowsingServiceFactory. Global, made a singleton so we 83 // The default SafeBrowsingServiceFactory. Global, made a singleton so we
107 // don't leak it. 84 // don't leak it.
108 class SafeBrowsingServiceFactoryImpl : public SafeBrowsingServiceFactory { 85 class SafeBrowsingServiceFactoryImpl : public SafeBrowsingServiceFactory {
109 public: 86 public:
110 SafeBrowsingService* CreateSafeBrowsingService() override { 87 SafeBrowsingService* CreateSafeBrowsingService() override {
111 return new SafeBrowsingService(V4FeatureList::GetV4UsageStatus()); 88 return new SafeBrowsingService(V4FeatureList::GetV4UsageStatus());
112 } 89 }
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 auto it = password_protection_service_map_.find(profile); 614 auto it = password_protection_service_map_.find(profile);
638 if (it != password_protection_service_map_.end()) 615 if (it != password_protection_service_map_.end())
639 password_protection_service_map_.erase(it); 616 password_protection_service_map_.erase(it);
640 } 617 }
641 618
642 void SafeBrowsingService::CreateTriggerManager() { 619 void SafeBrowsingService::CreateTriggerManager() {
643 DCHECK_CURRENTLY_ON(BrowserThread::UI); 620 DCHECK_CURRENTLY_ON(BrowserThread::UI);
644 trigger_manager_ = base::MakeUnique<TriggerManager>(ui_manager_.get()); 621 trigger_manager_ = base::MakeUnique<TriggerManager>(ui_manager_.get());
645 } 622 }
646 } // namespace safe_browsing 623 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « android_webview/common/aw_paths.cc ('k') | components/safe_browsing/common/safebrowsing_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698