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

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

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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/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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 if (entry->GetPageType() == content::PAGE_TYPE_INTERSTITIAL) 472 if (entry->GetPageType() == content::PAGE_TYPE_INTERSTITIAL)
473 entry = web_contents()->GetController().GetLastCommittedEntry(); 473 entry = web_contents()->GetController().GetLastCommittedEntry();
474 if (!entry) 474 if (!entry)
475 return false; 475 return false;
476 } 476 }
477 477
478 base::string16 value; 478 base::string16 value;
479 return entry->GetExtraData(kSafeBrowsingMatchKey, &value); 479 return entry->GetExtraData(kSafeBrowsingMatchKey, &value);
480 } 480 }
481 481
482 void ClientSideDetectionHost::WebContentsDestroyed(WebContents* tab) { 482 void ClientSideDetectionHost::WebContentsDestroyed() {
483 DCHECK(tab);
484 // Tell any pending classification request that it is being canceled. 483 // Tell any pending classification request that it is being canceled.
485 if (classification_request_.get()) { 484 if (classification_request_.get()) {
486 classification_request_->Cancel(); 485 classification_request_->Cancel();
487 } 486 }
488 // Cancel all pending feature extractions. 487 // Cancel all pending feature extractions.
489 feature_extractor_.reset(); 488 feature_extractor_.reset();
490 } 489 }
491 490
492 void ClientSideDetectionHost::OnPhishingPreClassificationDone( 491 void ClientSideDetectionHost::OnPhishingPreClassificationDone(
493 bool should_classify) { 492 bool should_classify) {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 ui_manager_->RemoveObserver(this); 737 ui_manager_->RemoveObserver(this);
739 738
740 ui_manager_ = ui_manager; 739 ui_manager_ = ui_manager;
741 if (ui_manager) 740 if (ui_manager)
742 ui_manager_->AddObserver(this); 741 ui_manager_->AddObserver(this);
743 742
744 database_manager_ = database_manager; 743 database_manager_ = database_manager;
745 } 744 }
746 745
747 } // namespace safe_browsing 746 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698