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

Side by Side Diff: chrome/browser/ui/webui/welcome_handler_android.h

Issue 22375004: Ensure sync footer visibility is always set correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 | « no previous file | chrome/browser/ui/webui/welcome_handler_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_
6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ 6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_
7 7
8 #include "base/scoped_observer.h" 8 #include "base/scoped_observer.h"
9 #include "chrome/browser/sync/profile_sync_service.h" 9 #include "chrome/browser/sync/profile_sync_service.h"
10 #include "chrome/browser/sync/profile_sync_service_observer.h" 10 #include "chrome/browser/sync/profile_sync_service_observer.h"
(...skipping 22 matching lines...) Expand all
33 void HandleShowSyncSettings(const ListValue* args); 33 void HandleShowSyncSettings(const ListValue* args);
34 34
35 // Callback for the "showTermsOfService" message. This opens the terms of 35 // Callback for the "showTermsOfService" message. This opens the terms of
36 // service popup. 36 // service popup.
37 void HandleShowTermsOfService(const ListValue* args); 37 void HandleShowTermsOfService(const ListValue* args);
38 38
39 // ProfileSyncServiceObserver implementation 39 // ProfileSyncServiceObserver implementation
40 virtual void OnStateChanged() OVERRIDE; 40 virtual void OnStateChanged() OVERRIDE;
41 41
42 private: 42 private:
43 // Update the sync footer visibility. Set |forced| if you want to force to
44 // send an update to the renderer regardless of whether we assume the state
45 // is up to date or not.
46 void UpdateSyncFooterVisibility(bool forced);
47
43 // Cached pointer to the sync service for this profile. 48 // Cached pointer to the sync service for this profile.
44 ProfileSyncService* sync_service_; 49 ProfileSyncService* sync_service_;
45 50
46 ScopedObserver<ProfileSyncService, WelcomeHandler> observer_manager_; 51 ScopedObserver<ProfileSyncService, WelcomeHandler> observer_manager_;
47 52
48 // Whether the sync footer is visible on the page. 53 // Whether the sync footer is visible on the page.
49 bool is_sync_footer_visible_; 54 bool is_sync_footer_visible_;
50 55
51 DISALLOW_COPY_AND_ASSIGN(WelcomeHandler); 56 DISALLOW_COPY_AND_ASSIGN(WelcomeHandler);
52 }; 57 };
53 58
54 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_ 59 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_HANDLER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/welcome_handler_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698