| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |