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

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

Issue 7093004: Sync: Refactor the ProfileSyncService and sync setup flow to remove use of WebUI from PSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes and cleanups. Created 9 years, 6 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;
42 41
43 namespace browser_sync { 42 namespace browser_sync {
44 class BackendMigrator; 43 class BackendMigrator;
45 class ChangeProcessor; 44 class ChangeProcessor;
46 class DataTypeManager; 45 class DataTypeManager;
47 class JsFrontend; 46 class JsFrontend;
48 class SessionModelAssociator; 47 class SessionModelAssociator;
49 namespace sessions { struct SyncSessionSnapshot; } 48 namespace sessions { struct SyncSessionSnapshot; }
50 } 49 }
51 50
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // progress, the sync system is already authenticated, or some error 236 // progress, the sync system is already authenticated, or some error
238 // occurred preventing the action. We make it the duty of ProfileSyncService 237 // occurred preventing the action. We make it the duty of ProfileSyncService
239 // 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.
240 virtual bool SetupInProgress() const; 239 virtual bool SetupInProgress() const;
241 bool WizardIsVisible() const { 240 bool WizardIsVisible() const {
242 return wizard_.IsVisible(); 241 return wizard_.IsVisible();
243 } 242 }
244 243
245 SyncSetupWizard& get_wizard() { return wizard_; } 244 SyncSetupWizard& get_wizard() { return wizard_; }
246 245
247 // Shows the login screen of the Sync setup wizard. |web_ui| is the WebUI 246 // Shows the login screen of the Sync setup wizard.
248 // object for a current settings tab, NULL if one doesn't exist or the calling 247 virtual void ShowLoginDialog();
249 // code doesn't know.
250 virtual void ShowLoginDialog(WebUI* web_ui);
251 248
252 // This method handles clicks on "sync error" UI, showing the appropriate 249 // This method handles clicks on "sync error" UI, showing the appropriate
253 // dialog for the error condition (relogin / enter passphrase). |web_ui| is 250 // dialog for the error condition (relogin / enter passphrase).
254 // the WebUI object for a current settings tab, NULL if one doesn't exist or 251 virtual void ShowErrorUI();
255 // the calling code doesn't know.
256 virtual void ShowErrorUI(WebUI* web_ui);
257 252
258 // Shows the configure screen of the Sync setup wizard. If |sync_everything| 253 // Shows the configure screen of the Sync setup wizard. If |sync_everything|
259 // is true, shows the corresponding page in the customize screen; otherwise, 254 // is true, shows the corresponding page in the customize screen; otherwise,
260 // displays the page that gives the user the ability to select which data 255 // displays the page that gives the user the ability to select which data
261 // types to sync. |web_ui| is the WebUI object for a current settings tab, 256 // types to sync.
262 // NULL if one doesn't exist or the calling code doesn't know. 257 void ShowConfigure(bool sync_everything);
263 void ShowConfigure(WebUI* web_ui, bool sync_everything);
264 258
265 void PromptForExistingPassphrase(WebUI* web_ui); 259 void PromptForExistingPassphrase();
266 260
267 void ShowSyncSetup(WebUI* web_ui, SyncSetupWizard::State state); 261 void ShowSyncSetup(SyncSetupWizard::State state);
268 262
269 // Pretty-printed strings for a given StatusSummary. 263 // Pretty-printed strings for a given StatusSummary.
270 static std::string BuildSyncStatusSummaryText( 264 static std::string BuildSyncStatusSummaryText(
271 const browser_sync::SyncBackendHost::StatusSummary& summary); 265 const browser_sync::SyncBackendHost::StatusSummary& summary);
272 266
273 // Returns true if the SyncBackendHost has told us it's ready to accept 267 // Returns true if the SyncBackendHost has told us it's ready to accept
274 // changes. 268 // changes.
275 // [REMARK] - it is safe to call this function only from the ui thread. 269 // [REMARK] - it is safe to call this function only from the ui thread.
276 // because the variable is not thread safe and should only be accessed from 270 // because the variable is not thread safe and should only be accessed from
277 // single thread. If we want multiple threads to access this(and there is 271 // single thread. If we want multiple threads to access this(and there is
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // because we haven't finished initializing). Cleared when we successfully 660 // because we haven't finished initializing). Cleared when we successfully
667 // post a new encrypt task to the sync backend. 661 // post a new encrypt task to the sync backend.
668 syncable::ModelTypeSet pending_types_for_encryption_; 662 syncable::ModelTypeSet pending_types_for_encryption_;
669 663
670 scoped_ptr<browser_sync::BackendMigrator> migrator_; 664 scoped_ptr<browser_sync::BackendMigrator> migrator_;
671 665
672 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 666 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
673 }; 667 };
674 668
675 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 669 #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