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

Side by Side Diff: chrome/browser/google/google_url_tracker_map_entry.cc

Issue 283413002: Turn GoogleURLTrackerNavigationHelper(Impl) into a per-tab object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit 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 | Annotate | Revision Log
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/google/google_url_tracker_map_entry.h" 5 #include "chrome/browser/google/google_url_tracker_map_entry.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/google/google_url_tracker.h" 8 #include "chrome/browser/google/google_url_tracker.h"
9 #include "chrome/browser/google/google_url_tracker_infobar_delegate.h" 9 #include "chrome/browser/google/google_url_tracker_infobar_delegate.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
11 #include "content/public/browser/notification_details.h" 11 #include "content/public/browser/notification_details.h"
12 #include "content/public/browser/notification_source.h" 12 #include "content/public/browser/notification_source.h"
13 13
14
Peter Kasting 2014/05/15 21:29:52 Nit: Don't remove this blank line
blundell 2014/05/16 11:54:18 Done.
15 GoogleURLTrackerMapEntry::GoogleURLTrackerMapEntry( 14 GoogleURLTrackerMapEntry::GoogleURLTrackerMapEntry(
16 GoogleURLTracker* google_url_tracker, 15 GoogleURLTracker* google_url_tracker,
17 InfoBarService* infobar_service, 16 InfoBarService* infobar_service,
18 const content::NavigationController* navigation_controller) 17 GoogleURLTrackerNavigationHelper* navigation_helper)
19 : google_url_tracker_(google_url_tracker), 18 : google_url_tracker_(google_url_tracker),
20 infobar_service_(infobar_service), 19 infobar_service_(infobar_service),
21 infobar_delegate_(NULL), 20 infobar_delegate_(NULL),
22 navigation_controller_(navigation_controller) { 21 navigation_helper_(navigation_helper) {
23 } 22 }
24 23
25 GoogleURLTrackerMapEntry::~GoogleURLTrackerMapEntry() { 24 GoogleURLTrackerMapEntry::~GoogleURLTrackerMapEntry() {
26 } 25 }
27 26
28 void GoogleURLTrackerMapEntry::Observe( 27 void GoogleURLTrackerMapEntry::Observe(
29 int type, 28 int type,
30 const content::NotificationSource& source, 29 const content::NotificationSource& source,
31 const content::NotificationDetails& details) { 30 const content::NotificationDetails& details) {
32 DCHECK(infobar_delegate_); 31 DCHECK(infobar_delegate_);
(...skipping 17 matching lines...) Expand all
50 void GoogleURLTrackerMapEntry::Close(bool redo_search) { 49 void GoogleURLTrackerMapEntry::Close(bool redo_search) {
51 if (infobar_delegate_) { 50 if (infobar_delegate_) {
52 infobar_delegate_->Close(redo_search); 51 infobar_delegate_->Close(redo_search);
53 } else { 52 } else {
54 // WARNING: |infobar_service_| may point to a deleted object. Do not 53 // WARNING: |infobar_service_| may point to a deleted object. Do not
55 // dereference it! See GoogleURLTracker::OnTabClosed(). 54 // dereference it! See GoogleURLTracker::OnTabClosed().
56 google_url_tracker_->DeleteMapEntryForService(infobar_service_); 55 google_url_tracker_->DeleteMapEntryForService(infobar_service_);
57 } 56 }
58 // WARNING: At this point |this| has been deleted! 57 // WARNING: At this point |this| has been deleted!
59 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698