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

Side by Side Diff: chrome/browser/sync/profile_sync_service.h

Issue 7057038: dom-ui sync: Eliminate jank when customizing sync settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: comment tweak Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SYNC_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 #include "content/common/notification_observer.h" 31 #include "content/common/notification_observer.h"
32 #include "content/common/notification_registrar.h" 32 #include "content/common/notification_registrar.h"
33 #include "content/common/notification_type.h" 33 #include "content/common/notification_type.h"
34 #include "googleurl/src/gurl.h" 34 #include "googleurl/src/gurl.h"
35 35
36 class NotificationDetails; 36 class NotificationDetails;
37 class NotificationSource; 37 class NotificationSource;
38 class Profile; 38 class Profile;
39 class ProfileSyncFactory; 39 class ProfileSyncFactory;
40 class SigninManager; 40 class SigninManager;
41 class WebUI;
41 42
42 namespace browser_sync { 43 namespace browser_sync {
43 class BackendMigrator; 44 class BackendMigrator;
44 class ChangeProcessor; 45 class ChangeProcessor;
45 class DataTypeManager; 46 class DataTypeManager;
46 class JsFrontend; 47 class JsFrontend;
47 class SessionModelAssociator; 48 class SessionModelAssociator;
48 namespace sessions { struct SyncSessionSnapshot; } 49 namespace sessions { struct SyncSessionSnapshot; }
49 } 50 }
50 51
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // Displays a dialog for the user to enter GAIA credentials and attempt 233 // Displays a dialog for the user to enter GAIA credentials and attempt
233 // re-authentication, and returns true if it actually opened the dialog. 234 // re-authentication, and returns true if it actually opened the dialog.
234 // Returns false if a dialog is already showing, an auth attempt is in 235 // Returns false if a dialog is already showing, an auth attempt is in
235 // progress, the sync system is already authenticated, or some error 236 // progress, the sync system is already authenticated, or some error
236 // occurred preventing the action. We make it the duty of ProfileSyncService 237 // occurred preventing the action. We make it the duty of ProfileSyncService
237 // to open the dialog to easily ensure only one is ever showing. 238 // to open the dialog to easily ensure only one is ever showing.
238 virtual bool SetupInProgress() const; 239 virtual bool SetupInProgress() const;
239 bool WizardIsVisible() const { 240 bool WizardIsVisible() const {
240 return wizard_.IsVisible(); 241 return wizard_.IsVisible();
241 } 242 }
242 virtual void ShowLoginDialog(); 243
243 SyncSetupWizard& get_wizard() { return wizard_; } 244 SyncSetupWizard& get_wizard() { return wizard_; }
244 245
246 // Shows the login screen of the Sync setup wizard. |web_ui| is the WebUI
247 // object for a current settings tab, NULL if one doesn't exist or the calling
248 // code doesn't know.
249 virtual void ShowLoginDialog(WebUI* web_ui);
250
245 // This method handles clicks on "sync error" UI, showing the appropriate 251 // This method handles clicks on "sync error" UI, showing the appropriate
246 // dialog for the error condition (relogin / enter passphrase). 252 // dialog for the error condition (relogin / enter passphrase). |web_ui| is
247 virtual void ShowErrorUI(); 253 // the WebUI object for a current settings tab, NULL if one doesn't exist or
254 // the calling code doesn't know.
255 virtual void ShowErrorUI(WebUI* web_ui);
248 256
249 // Shows the configure screen of the Sync setup wizard. If |sync_everything| 257 // Shows the configure screen of the Sync setup wizard. If |sync_everything|
250 // is true, shows the corresponding page in the customize screen; otherwise, 258 // is true, shows the corresponding page in the customize screen; otherwise,
251 // displays the page that gives the user the ability to select which data 259 // displays the page that gives the user the ability to select which data
252 // types to sync. 260 // types to sync. |web_ui| is the WebUI object for a current settings tab,
253 void ShowConfigure(bool sync_everything); 261 // NULL if one doesn't exist or the calling code doesn't know.
262 void ShowConfigure(WebUI* web_ui, bool sync_everything);
254 263
255 void PromptForExistingPassphrase(); 264 void PromptForExistingPassphrase();
256 265
257 // Pretty-printed strings for a given StatusSummary. 266 // Pretty-printed strings for a given StatusSummary.
258 static std::string BuildSyncStatusSummaryText( 267 static std::string BuildSyncStatusSummaryText(
259 const browser_sync::SyncBackendHost::StatusSummary& summary); 268 const browser_sync::SyncBackendHost::StatusSummary& summary);
260 269
261 // Returns true if the SyncBackendHost has told us it's ready to accept 270 // Returns true if the SyncBackendHost has told us it's ready to accept
262 // changes. 271 // changes.
263 // [REMARK] - it is safe to call this function only from the ui thread. 272 // [REMARK] - it is safe to call this function only from the ui thread.
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 }; 677 };
669 678
670 EncryptedTypes encrypted_types_; 679 EncryptedTypes encrypted_types_;
671 680
672 scoped_ptr<browser_sync::BackendMigrator> migrator_; 681 scoped_ptr<browser_sync::BackendMigrator> migrator_;
673 682
674 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 683 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
675 }; 684 };
676 685
677 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 686 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/sync_setup_overlay.js ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698