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

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

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 MalwareDetails class. 5 // Implementation of the MalwareDetails class.
6 6
7 #include "chrome/browser/safe_browsing/malware_details.h" 7 #include "chrome/browser/safe_browsing/malware_details.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "chrome/browser/net/chrome_url_request_context.h" 11 #include "chrome/browser/net/chrome_url_request_context.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/safe_browsing/malware_details_cache.h" 13 #include "chrome/browser/safe_browsing/malware_details_cache.h"
14 #include "chrome/browser/safe_browsing/malware_details_history.h" 14 #include "chrome/browser/safe_browsing/malware_details_history.h"
15 #include "chrome/browser/safe_browsing/report.pb.h" 15 #include "chrome/browser/safe_browsing/report.pb.h"
16 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 16 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
17 #include "chrome/common/safe_browsing/safebrowsing_messages.h" 17 #include "chrome/common/safe_browsing/safebrowsing_messages.h"
18 #include "content/browser/renderer_host/render_view_host.h" 18 #include "content/browser/renderer_host/render_view_host.h"
19 #include "content/browser/tab_contents/navigation_controller.h"
20 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/navigation_controller.h"
21 #include "content/public/browser/navigation_entry.h" 21 #include "content/public/browser/navigation_entry.h"
22 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
23 #include "net/base/io_buffer.h" 23 #include "net/base/io_buffer.h"
24 #include "net/disk_cache/disk_cache.h" 24 #include "net/disk_cache/disk_cache.h"
25 #include "net/url_request/url_request_context_getter.h" 25 #include "net/url_request/url_request_context_getter.h"
26 26
27 using content::BrowserThread; 27 using content::BrowserThread;
28 using content::NavigationEntry; 28 using content::NavigationEntry;
29 using content::WebContents; 29 using content::WebContents;
30 using safe_browsing::ClientMalwareReportRequest; 30 using safe_browsing::ClientMalwareReportRequest;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 // Send the report, using the SafeBrowsingService. 307 // Send the report, using the SafeBrowsingService.
308 std::string serialized; 308 std::string serialized;
309 if (!report_->SerializeToString(&serialized)) { 309 if (!report_->SerializeToString(&serialized)) {
310 DLOG(ERROR) << "Unable to serialize the malware report."; 310 DLOG(ERROR) << "Unable to serialize the malware report.";
311 return; 311 return;
312 } 312 }
313 313
314 sb_service_->SendSerializedMalwareDetails(serialized); 314 sb_service_->SendSerializedMalwareDetails(serialized);
315 } 315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698