[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / google / google_url_tracker_map_entry.h
blob2e035a7a67c56ef495a3df8df75f7c3617314739
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
8 #include "content/public/browser/notification_observer.h"
9 #include "content/public/browser/notification_registrar.h"
11 class GoogleURLTracker;
12 class GoogleURLTrackerInfoBarDelegate;
13 class InfoBarService;
15 namespace content {
16 class NavigationController;
19 class GoogleURLTrackerMapEntry : public content::NotificationObserver {
20 public:
21 GoogleURLTrackerMapEntry(
22 GoogleURLTracker* google_url_tracker,
23 InfoBarService* infobar_service,
24 const content::NavigationController* navigation_controller);
25 virtual ~GoogleURLTrackerMapEntry();
27 bool has_infobar_delegate() const { return !!infobar_delegate_; }
28 GoogleURLTrackerInfoBarDelegate* infobar_delegate() {
29 return infobar_delegate_;
31 void SetInfoBarDelegate(GoogleURLTrackerInfoBarDelegate* infobar_delegate);
33 const content::NavigationController* navigation_controller() const {
34 return navigation_controller_;
37 void Close(bool redo_search);
39 private:
40 friend class GoogleURLTrackerTest;
42 // content::NotificationObserver:
43 virtual void Observe(int type,
44 const content::NotificationSource& source,
45 const content::NotificationDetails& details) OVERRIDE;
47 content::NotificationRegistrar registrar_;
48 GoogleURLTracker* const google_url_tracker_;
49 const InfoBarService* const infobar_service_;
50 GoogleURLTrackerInfoBarDelegate* infobar_delegate_;
51 const content::NavigationController* const navigation_controller_;
53 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerMapEntry);
56 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_