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

Side by Side Diff: chrome/browser/rlz/chrome_rlz_tracker_delegate.h

Issue 1229933005: Revert "Componentize chrome/browser/rlz" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_
6 #define CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_
7
8 #include "base/callback_list.h"
9 #include "base/macros.h"
10 #include "components/rlz/rlz_tracker_delegate.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13
14 class Profile;
15
16 // ChromeRLZTrackerDelegate implements RLZTrackerDelegate abstract interface
17 // and provides access to Chrome features.
18 class ChromeRLZTrackerDelegate : public rlz::RLZTrackerDelegate,
19 public content::NotificationObserver {
20 public:
21 ChromeRLZTrackerDelegate();
22 ~ChromeRLZTrackerDelegate() override;
23
24 static bool IsGoogleDefaultSearch(Profile* profile);
25 static bool IsGoogleHomepage(Profile* profile);
26 static bool IsGoogleInStartpages(Profile* profile);
27
28 private:
29 // RLZTrackerDelegate implementation.
30 void Cleanup() override;
31 bool IsOnUIThread() override;
32 base::SequencedWorkerPool* GetBlockingPool() override;
33 net::URLRequestContextGetter* GetRequestContext() override;
34 bool GetBrand(std::string* brand) override;
35 bool IsBrandOrganic(const std::string& brand) override;
36 bool GetReactivationBrand(std::string* brand) override;
37 bool ShouldEnableZeroDelayForTesting() override;
38 bool GetLanguage(base::string16* language) override;
39 bool GetReferral(base::string16* referral) override;
40 bool ClearReferral() override;
41 void SetOmniboxSearchCallback(const base::Closure& callback) override;
42 void SetHomepageSearchCallback(const base::Closure& callback) override;
43
44 // content::NotificationObserver implementation:
45 void Observe(int type,
46 const content::NotificationSource& source,
47 const content::NotificationDetails& details) override;
48
49 content::NotificationRegistrar registrar_;
50 base::Closure on_omnibox_search_callback_;
51 base::Closure on_homepage_search_callback_;
52
53 DISALLOW_COPY_AND_ASSIGN(ChromeRLZTrackerDelegate);
54 };
55
56 #endif // CHROME_BROWSER_RLZ_CHROME_RLZ_TRACKER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/session/user_session_manager.cc ('k') | chrome/browser/rlz/chrome_rlz_tracker_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698