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

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

Issue 2540563002: Move SafeBrowsingUIManager::UnsafeResource to security_interstitials namespace (Closed)
Patch Set: rebase update Created 4 years 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 // Implementation of the ThreatDetails class. 5 // Implementation of the ThreatDetails class.
6 6
7 #include "chrome/browser/safe_browsing/threat_details.h" 7 #include "chrome/browser/safe_browsing/threat_details.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 } // namespace 124 } // namespace
125 125
126 // The default ThreatDetailsFactory. Global, made a singleton so we 126 // The default ThreatDetailsFactory. Global, made a singleton so we
127 // don't leak it. 127 // don't leak it.
128 class ThreatDetailsFactoryImpl : public ThreatDetailsFactory { 128 class ThreatDetailsFactoryImpl : public ThreatDetailsFactory {
129 public: 129 public:
130 ThreatDetails* CreateThreatDetails( 130 ThreatDetails* CreateThreatDetails(
131 SafeBrowsingUIManager* ui_manager, 131 SafeBrowsingUIManager* ui_manager,
132 WebContents* web_contents, 132 WebContents* web_contents,
133 const SafeBrowsingUIManager::UnsafeResource& unsafe_resource) override { 133 const security_interstitials::UnsafeResource& unsafe_resource) override {
134 return new ThreatDetails(ui_manager, web_contents, unsafe_resource); 134 return new ThreatDetails(ui_manager, web_contents, unsafe_resource);
135 } 135 }
136 136
137 private: 137 private:
138 friend struct base::DefaultLazyInstanceTraits<ThreatDetailsFactoryImpl>; 138 friend struct base::DefaultLazyInstanceTraits<ThreatDetailsFactoryImpl>;
139 139
140 ThreatDetailsFactoryImpl() {} 140 ThreatDetailsFactoryImpl() {}
141 141
142 DISALLOW_COPY_AND_ASSIGN(ThreatDetailsFactoryImpl); 142 DISALLOW_COPY_AND_ASSIGN(ThreatDetailsFactoryImpl);
143 }; 143 };
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // Send the report, using the SafeBrowsingService. 412 // Send the report, using the SafeBrowsingService.
413 std::string serialized; 413 std::string serialized;
414 if (!report_->SerializeToString(&serialized)) { 414 if (!report_->SerializeToString(&serialized)) {
415 DLOG(ERROR) << "Unable to serialize the threat report."; 415 DLOG(ERROR) << "Unable to serialize the threat report.";
416 return; 416 return;
417 } 417 }
418 ui_manager_->SendSerializedThreatDetails(serialized); 418 ui_manager_->SendSerializedThreatDetails(serialized);
419 } 419 }
420 420
421 } // namespace safe_browsing 421 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/threat_details.h ('k') | chrome/browser/safe_browsing/threat_details_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698