Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / browser / google / google_search_counter_android.h
blob89830c3d686c4e1f80dd567ed04747e2f39ec27d
1 // Copyright (c) 2014 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_SEARCH_COUNTER_ANDROID_H_
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_SEARCH_COUNTER_ANDROID_H_
8 #include "base/macros.h"
9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h"
12 class Profile;
14 // A listener for counting Google searches in Android Chrome from various search
15 // access points. No actual search query content is observed. See
16 // GoogleSearchMetrics for more details about these access points.
17 class GoogleSearchCounterAndroid : content::NotificationObserver {
18 public:
19 explicit GoogleSearchCounterAndroid(Profile* profile);
20 ~GoogleSearchCounterAndroid() override;
22 private:
23 friend class GoogleSearchCounterAndroidTest;
25 void ProcessCommittedEntry(const content::NotificationSource& source,
26 const content::NotificationDetails& details);
28 // content::NotificationObserver:
29 void Observe(int type,
30 const content::NotificationSource& source,
31 const content::NotificationDetails& details) override;
33 Profile* profile_;
34 content::NotificationRegistrar registrar_;
36 DISALLOW_COPY_AND_ASSIGN(GoogleSearchCounterAndroid);
39 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_SEARCH_COUNTER_ANDROID_H_