OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_ |
6 #define CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_ | 6 #define CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/omnibox/browser/omnibox_event_global_tracker.h" | 10 #include "components/omnibox/browser/omnibox_event_global_tracker.h" |
11 #include "components/rlz/rlz_tracker_delegate.h" | 11 #include "components/rlz/rlz_tracker_delegate.h" |
12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
14 | 14 |
15 class Profile; | 15 class Profile; |
16 | 16 |
| 17 namespace user_prefs { |
| 18 class PrefRegistrySyncable; |
| 19 } |
| 20 |
17 // ChromeRLZTrackerDelegate implements RLZTrackerDelegate abstract interface | 21 // ChromeRLZTrackerDelegate implements RLZTrackerDelegate abstract interface |
18 // and provides access to Chrome features. | 22 // and provides access to Chrome features. |
19 class ChromeRLZTrackerDelegate : public rlz::RLZTrackerDelegate, | 23 class ChromeRLZTrackerDelegate : public rlz::RLZTrackerDelegate, |
20 public content::NotificationObserver { | 24 public content::NotificationObserver { |
21 public: | 25 public: |
22 ChromeRLZTrackerDelegate(); | 26 ChromeRLZTrackerDelegate(); |
23 ~ChromeRLZTrackerDelegate() override; | 27 ~ChromeRLZTrackerDelegate() override; |
24 | 28 |
| 29 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 30 |
25 static bool IsGoogleDefaultSearch(Profile* profile); | 31 static bool IsGoogleDefaultSearch(Profile* profile); |
26 static bool IsGoogleHomepage(Profile* profile); | 32 static bool IsGoogleHomepage(Profile* profile); |
27 static bool IsGoogleInStartpages(Profile* profile); | 33 static bool IsGoogleInStartpages(Profile* profile); |
28 | 34 |
29 private: | 35 private: |
30 // RLZTrackerDelegate implementation. | 36 // RLZTrackerDelegate implementation. |
31 void Cleanup() override; | 37 void Cleanup() override; |
32 bool IsOnUIThread() override; | 38 bool IsOnUIThread() override; |
33 base::SequencedWorkerPool* GetBlockingPool() override; | 39 base::SequencedWorkerPool* GetBlockingPool() override; |
34 net::URLRequestContextGetter* GetRequestContext() override; | 40 net::URLRequestContextGetter* GetRequestContext() override; |
(...skipping 21 matching lines...) Expand all Loading... |
56 | 62 |
57 // Subscription for receiving callbacks that a URL was opened from the | 63 // Subscription for receiving callbacks that a URL was opened from the |
58 // omnibox. | 64 // omnibox. |
59 std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> | 65 std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> |
60 omnibox_url_opened_subscription_; | 66 omnibox_url_opened_subscription_; |
61 | 67 |
62 DISALLOW_COPY_AND_ASSIGN(ChromeRLZTrackerDelegate); | 68 DISALLOW_COPY_AND_ASSIGN(ChromeRLZTrackerDelegate); |
63 }; | 69 }; |
64 | 70 |
65 #endif // CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_ | 71 #endif // CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_ |
OLD | NEW |