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

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

Issue 2756933003: Componentize safe_browsing: move renderer/ reporting part for WebView. (Closed)
Patch Set: fix comments 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
« no previous file with comments | « no previous file | chrome/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 13 matching lines...) Expand all
24 #include "content/public/browser/navigation_entry.h" 24 #include "content/public/browser/navigation_entry.h"
25 #include "content/public/browser/render_frame_host.h" 25 #include "content/public/browser/render_frame_host.h"
26 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
27 #include "net/url_request/url_request_context_getter.h" 27 #include "net/url_request/url_request_context_getter.h"
28 28
29 using content::BrowserThread; 29 using content::BrowserThread;
30 using content::NavigationEntry; 30 using content::NavigationEntry;
31 using content::RenderFrameHost; 31 using content::RenderFrameHost;
32 using content::WebContents; 32 using content::WebContents;
33 33
34 // Keep in sync with KMaxNodes in renderer/safe_browsing/threat_dom_details 34 // Keep in sync with KMaxNodes in components/safe_browsing/renderer/
35 // threat_dom_details.cc
35 static const uint32_t kMaxDomNodes = 500; 36 static const uint32_t kMaxDomNodes = 500;
36 37
37 namespace safe_browsing { 38 namespace safe_browsing {
38 39
39 // static 40 // static
40 ThreatDetailsFactory* ThreatDetails::factory_ = NULL; 41 ThreatDetailsFactory* ThreatDetails::factory_ = NULL;
41 42
42 namespace { 43 namespace {
43 44
44 typedef std::unordered_set<std::string> StringSet; 45 typedef std::unordered_set<std::string> StringSet;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 // Send the report, using the SafeBrowsingService. 583 // Send the report, using the SafeBrowsingService.
583 std::string serialized; 584 std::string serialized;
584 if (!report_->SerializeToString(&serialized)) { 585 if (!report_->SerializeToString(&serialized)) {
585 DLOG(ERROR) << "Unable to serialize the threat report."; 586 DLOG(ERROR) << "Unable to serialize the threat report.";
586 return; 587 return;
587 } 588 }
588 ui_manager_->SendSerializedThreatDetails(serialized); 589 ui_manager_->SendSerializedThreatDetails(serialized);
589 } 590 }
590 591
591 } // namespace safe_browsing 592 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698