Chromium Code Reviews| 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..82ee2842774767bc826429904e16c5e945f9ecf1 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,6 +32,10 @@ class GoogleURLTrackerMapEntry : public content::NotificationObserver { |
| void SetInfoBarDelegate(GoogleURLTrackerInfoBarDelegate* infobar_delegate); |
| GoogleURLTrackerNavigationHelper* navigation_helper() { |
| + // This object gives ownership of |navigation_helper_| to the infobar |
| + // delegate in |SetInfoBarDelegate()|. |
|
Peter Kasting
2014/05/28 22:19:04
Nit: No || around function name
blundell
2014/05/30 09:39:18
Done.
|
| + if (has_infobar_delegate()) |
| + return infobar_delegate_->navigation_helper(); |
| return navigation_helper_.get(); |
|
Peter Kasting
2014/05/28 22:19:04
Nit: Shorter:
return has_infobar_delegate() ?
blundell
2014/05/30 09:39:18
Done.
|
| } |
| @@ -44,7 +51,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_; |