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

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

Issue 8469015: Switch BackgroundContents to use TabContents instead of RenderViewHost. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix unittest Created 9 years, 1 month 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 #include "chrome/browser/safe_browsing/client_side_detection_host.h" 5 #include "chrome/browser/safe_browsing/client_side_detection_host.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 bool ClientSideDetectionHost::OnMessageReceived(const IPC::Message& message) { 283 bool ClientSideDetectionHost::OnMessageReceived(const IPC::Message& message) {
284 bool handled = true; 284 bool handled = true;
285 IPC_BEGIN_MESSAGE_MAP(ClientSideDetectionHost, message) 285 IPC_BEGIN_MESSAGE_MAP(ClientSideDetectionHost, message)
286 IPC_MESSAGE_HANDLER(SafeBrowsingHostMsg_PhishingDetectionDone, 286 IPC_MESSAGE_HANDLER(SafeBrowsingHostMsg_PhishingDetectionDone,
287 OnPhishingDetectionDone) 287 OnPhishingDetectionDone)
288 IPC_MESSAGE_UNHANDLED(handled = false) 288 IPC_MESSAGE_UNHANDLED(handled = false)
289 IPC_END_MESSAGE_MAP() 289 IPC_END_MESSAGE_MAP()
290 return handled; 290 return handled;
291 } 291 }
292 292
293 void ClientSideDetectionHost::DidNavigateMainFramePostCommit( 293 void ClientSideDetectionHost::DidNavigateMainFrame(
294 const content::LoadCommittedDetails& details, 294 const content::LoadCommittedDetails& details,
295 const ViewHostMsg_FrameNavigate_Params& params) { 295 const ViewHostMsg_FrameNavigate_Params& params) {
296 // TODO(noelutz): move this DCHECK to TabContents and fix all the unit tests 296 // TODO(noelutz): move this DCHECK to TabContents and fix all the unit tests
297 // that don't call this method on the UI thread. 297 // that don't call this method on the UI thread.
298 // DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 298 // DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
299 if (details.is_in_page) { 299 if (details.is_in_page) {
300 // If the navigation is within the same page, the user isn't really 300 // If the navigation is within the same page, the user isn't really
301 // navigating away. We don't need to cancel a pending callback or 301 // navigating away. We don't need to cancel a pending callback or
302 // begin a new classification. 302 // begin a new classification.
303 return; 303 return;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 if (sb_service_) { 489 if (sb_service_) {
490 sb_service_->RemoveObserver(this); 490 sb_service_->RemoveObserver(this);
491 } 491 }
492 sb_service_ = service; 492 sb_service_ = service;
493 if (sb_service_) { 493 if (sb_service_) {
494 sb_service_->AddObserver(this); 494 sb_service_->AddObserver(this);
495 } 495 }
496 } 496 }
497 497
498 } // namespace safe_browsing 498 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_host.h ('k') | chrome/browser/tab_contents/background_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698