Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: ios/chrome/browser/rlz/rlz_tracker_delegate_impl.h

Issue 1242373002: Implements RLZTrackerDelegate on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@omnibox-events-relay
Patch Set: Rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/pref_names.cc ('k') | ios/chrome/browser/rlz/rlz_tracker_delegate_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_
6 #define IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_
7
8 #include "base/callback.h"
9 #include "base/callback_list.h"
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/rlz/rlz_tracker_delegate.h"
13
14 struct OmniboxLog;
15
16 namespace ios {
17 class ChromeBrowserState;
18 }
19
20 // RLZTrackerDelegateImpl implements RLZTrackerDelegate abstract interface
21 // and provides access to Chrome on iOS features.
22 class RLZTrackerDelegateImpl : public rlz::RLZTrackerDelegate {
23 public:
24 RLZTrackerDelegateImpl();
25 ~RLZTrackerDelegateImpl() override;
26
27 static bool IsGoogleDefaultSearch(ios::ChromeBrowserState* browser_state);
28 static bool IsGoogleHomepage(ios::ChromeBrowserState* browser_state);
29 static bool IsGoogleInStartpages(ios::ChromeBrowserState* browser_state);
30
31 private:
32 // RLZTrackerDelegate implementation.
33 void Cleanup() override;
34 bool IsOnUIThread() override;
35 base::SequencedWorkerPool* GetBlockingPool() override;
36 net::URLRequestContextGetter* GetRequestContext() override;
37 bool GetBrand(std::string* brand) override;
38 bool IsBrandOrganic(const std::string& brand) override;
39 bool GetReactivationBrand(std::string* brand) override;
40 bool ShouldEnableZeroDelayForTesting() override;
41 bool GetLanguage(base::string16* language) override;
42 bool GetReferral(base::string16* referral) override;
43 bool ClearReferral() override;
44 void SetOmniboxSearchCallback(const base::Closure& callback) override;
45 void SetHomepageSearchCallback(const base::Closure& callback) override;
46
47 // Called when user open an URL from the Omnibox.
48 void OnURLOpenedFromOmnibox(OmniboxLog* log);
49
50 base::Closure on_omnibox_search_callback_;
51 scoped_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription>
52 on_omnibox_url_opened_subscription_;
53
54 DISALLOW_COPY_AND_ASSIGN(RLZTrackerDelegateImpl);
55 };
56
57 #endif // IOS_CHROME_BROWSER_RLZ_RLZ_TRACKER_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/pref_names.cc ('k') | ios/chrome/browser/rlz/rlz_tracker_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698