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 IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_ | 5 #ifndef IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_ |
6 #define IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_ | 6 #define IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 ~RLZTrackerDelegateImpl() override; | 26 ~RLZTrackerDelegateImpl() override; |
27 | 27 |
28 static bool IsGoogleDefaultSearch(ios::ChromeBrowserState* browser_state); | 28 static bool IsGoogleDefaultSearch(ios::ChromeBrowserState* browser_state); |
29 static bool IsGoogleHomepage(ios::ChromeBrowserState* browser_state); | 29 static bool IsGoogleHomepage(ios::ChromeBrowserState* browser_state); |
30 static bool IsGoogleInStartpages(ios::ChromeBrowserState* browser_state); | 30 static bool IsGoogleInStartpages(ios::ChromeBrowserState* browser_state); |
31 | 31 |
32 private: | 32 private: |
33 // RLZTrackerDelegate implementation. | 33 // RLZTrackerDelegate implementation. |
34 void Cleanup() override; | 34 void Cleanup() override; |
35 bool IsOnUIThread() override; | 35 bool IsOnUIThread() override; |
36 base::SequencedWorkerPool* GetBlockingPool() override; | |
37 net::URLRequestContextGetter* GetRequestContext() override; | 36 net::URLRequestContextGetter* GetRequestContext() override; |
38 bool GetBrand(std::string* brand) override; | 37 bool GetBrand(std::string* brand) override; |
39 bool IsBrandOrganic(const std::string& brand) override; | 38 bool IsBrandOrganic(const std::string& brand) override; |
40 bool GetReactivationBrand(std::string* brand) override; | 39 bool GetReactivationBrand(std::string* brand) override; |
41 bool ShouldEnableZeroDelayForTesting() override; | 40 bool ShouldEnableZeroDelayForTesting() override; |
42 bool GetLanguage(base::string16* language) override; | 41 bool GetLanguage(base::string16* language) override; |
43 bool GetReferral(base::string16* referral) override; | 42 bool GetReferral(base::string16* referral) override; |
44 bool ClearReferral() override; | 43 bool ClearReferral() override; |
45 void SetOmniboxSearchCallback(const base::Closure& callback) override; | 44 void SetOmniboxSearchCallback(const base::Closure& callback) override; |
46 void SetHomepageSearchCallback(const base::Closure& callback) override; | 45 void SetHomepageSearchCallback(const base::Closure& callback) override; |
47 | 46 |
48 // Called when user open an URL from the Omnibox. | 47 // Called when user open an URL from the Omnibox. |
49 void OnURLOpenedFromOmnibox(OmniboxLog* log); | 48 void OnURLOpenedFromOmnibox(OmniboxLog* log); |
50 | 49 |
51 base::Closure on_omnibox_search_callback_; | 50 base::Closure on_omnibox_search_callback_; |
52 std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> | 51 std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> |
53 on_omnibox_url_opened_subscription_; | 52 on_omnibox_url_opened_subscription_; |
54 | 53 |
55 DISALLOW_COPY_AND_ASSIGN(RLZTrackerDelegateImpl); | 54 DISALLOW_COPY_AND_ASSIGN(RLZTrackerDelegateImpl); |
56 }; | 55 }; |
57 | 56 |
58 #endif // IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_ | 57 #endif // IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_ |
OLD | NEW |