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

Side by Side Diff: chrome/browser/search/one_google_bar/one_google_bar_service.h

Issue 2819553003: Hook up LocalNtpSource to OneGoogleBarService (Closed)
Patch Set: more cleanup Created 3 years, 7 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_H_
6 #define CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_H_ 6 #define CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 29 matching lines...) Expand all
40 // Add/remove observers. All observers must unregister themselves before the 40 // Add/remove observers. All observers must unregister themselves before the
41 // OneGoogleBarService is destroyed. 41 // OneGoogleBarService is destroyed.
42 void AddObserver(OneGoogleBarServiceObserver* observer); 42 void AddObserver(OneGoogleBarServiceObserver* observer);
43 void RemoveObserver(OneGoogleBarServiceObserver* observer); 43 void RemoveObserver(OneGoogleBarServiceObserver* observer);
44 44
45 private: 45 private:
46 class SigninObserver; 46 class SigninObserver;
47 47
48 void SigninStatusChanged(); 48 void SigninStatusChanged();
49 49
50 void OneGoogleBarDataFetched(const base::Optional<OneGoogleBarData>& data);
51
50 void SetOneGoogleBarData(const base::Optional<OneGoogleBarData>& data); 52 void SetOneGoogleBarData(const base::Optional<OneGoogleBarData>& data);
51 53
52 std::unique_ptr<OneGoogleBarFetcher> fetcher_; 54 std::unique_ptr<OneGoogleBarFetcher> fetcher_;
53 55
54 std::unique_ptr<SigninObserver> signin_observer_; 56 std::unique_ptr<SigninObserver> signin_observer_;
55 57
56 base::ObserverList<OneGoogleBarServiceObserver, true> observers_; 58 base::ObserverList<OneGoogleBarServiceObserver, true> observers_;
57 59
58 base::Optional<OneGoogleBarData> one_google_bar_data_; 60 base::Optional<OneGoogleBarData> one_google_bar_data_;
59 }; 61 };
60 62
61 #endif // CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_H_ 63 #endif // CHROME_BROWSER_SEARCH_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698