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

Unified Diff: chrome/browser/google/google_url_tracker_map_entry.h

Issue 293503003: Eliminate dependence of GoogleURLTracker et al. on InfoBarService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google/google_url_tracker_map_entry.h
diff --git a/chrome/browser/google/google_url_tracker_map_entry.h b/chrome/browser/google/google_url_tracker_map_entry.h
index 5f087fbe95c6001a70f8c304b773060a4a77fbde..1acd274341bb8a3bad78753308d019c495b51c48 100644
--- a/chrome/browser/google/google_url_tracker_map_entry.h
+++ b/chrome/browser/google/google_url_tracker_map_entry.h
@@ -6,19 +6,22 @@
#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/google/google_url_tracker_infobar_delegate.h"
#include "chrome/browser/google/google_url_tracker_navigation_helper.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
class GoogleURLTracker;
-class GoogleURLTrackerInfoBarDelegate;
-class InfoBarService;
+
+namespace infobars {
+class InfoBarManager;
+}
class GoogleURLTrackerMapEntry : public content::NotificationObserver {
public:
GoogleURLTrackerMapEntry(
GoogleURLTracker* google_url_tracker,
- InfoBarService* infobar_service,
+ infobars::InfoBarManager* infobar_manager,
scoped_ptr<GoogleURLTrackerNavigationHelper> navigation_helper);
virtual ~GoogleURLTrackerMapEntry();
@@ -29,7 +32,10 @@ class GoogleURLTrackerMapEntry : public content::NotificationObserver {
void SetInfoBarDelegate(GoogleURLTrackerInfoBarDelegate* infobar_delegate);
GoogleURLTrackerNavigationHelper* navigation_helper() {
- return navigation_helper_.get();
+ // This object gives ownership of |navigation_helper_| to the infobar
+ // delegate in SetInfoBarDelegate().
+ return has_infobar_delegate() ?
+ infobar_delegate_->navigation_helper() : navigation_helper_.get();
}
void Close(bool redo_search);
@@ -44,7 +50,7 @@ class GoogleURLTrackerMapEntry : public content::NotificationObserver {
content::NotificationRegistrar registrar_;
GoogleURLTracker* const google_url_tracker_;
- const InfoBarService* const infobar_service_;
+ const infobars::InfoBarManager* const infobar_manager_;
GoogleURLTrackerInfoBarDelegate* infobar_delegate_;
scoped_ptr<GoogleURLTrackerNavigationHelper> navigation_helper_;
« no previous file with comments | « chrome/browser/google/google_url_tracker_infobar_delegate.cc ('k') | chrome/browser/google/google_url_tracker_map_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698