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

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

Issue 4980005: Allow sync with 2-factor StrongAuth accounts in ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored 2-factor error passing Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // setting a passphrase as opposed to implicitly (from the users' perspective) 348 // setting a passphrase as opposed to implicitly (from the users' perspective)
349 // using their Google Account password. An implicit SetPassphrase will *not* 349 // using their Google Account password. An implicit SetPassphrase will *not*
350 // *not* override an explicit passphrase set previously. 350 // *not* override an explicit passphrase set previously.
351 virtual void SetPassphrase(const std::string& passphrase, bool is_explicit); 351 virtual void SetPassphrase(const std::string& passphrase, bool is_explicit);
352 352
353 // Returns whether processing changes is allowed. Check this before doing 353 // Returns whether processing changes is allowed. Check this before doing
354 // any model-modifying operations. 354 // any model-modifying operations.
355 bool ShouldPushChanges(); 355 bool ShouldPushChanges();
356 356
357 const GURL& sync_service_url() const { return sync_service_url_; } 357 const GURL& sync_service_url() const { return sync_service_url_; }
358 SigninManager* signin() { return signin_.get(); }
John Gregg 2010/11/18 00:05:30 why are you making signin() public? Would rather
stevenjb 2010/11/18 00:11:09 I didn't add signin(), just cros_user() (I elimina
John Gregg 2010/11/18 00:22:51 Oh, never mind, read it incorrectly. The sync/bro
359 const std::string& cros_user() const { return cros_user_; }
358 360
359 SigninManager* signin() { return &signin_; }
360 protected: 361 protected:
361 // Used by ProfileSyncServiceMock only. 362 // Used by ProfileSyncServiceMock only.
362 // 363 //
363 // TODO(akalin): Separate this class out into an abstract 364 // TODO(akalin): Separate this class out into an abstract
364 // ProfileSyncService interface and a ProfileSyncServiceImpl class 365 // ProfileSyncService interface and a ProfileSyncServiceImpl class
365 // so we don't need this hack anymore. 366 // so we don't need this hack anymore.
366 ProfileSyncService(); 367 ProfileSyncService();
367 368
368 // Helper to install and configure a data type manager. 369 // Helper to install and configure a data type manager.
369 void ConfigureDataTypeManager(); 370 void ConfigureDataTypeManager();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 457
457 // Various pieces of UI query this value to determine if they should show 458 // Various pieces of UI query this value to determine if they should show
458 // an "Authenticating.." type of message. We are the only central place 459 // an "Authenticating.." type of message. We are the only central place
459 // all auth attempts funnel through, so it makes sense to provide this. 460 // all auth attempts funnel through, so it makes sense to provide this.
460 // As its name suggests, this should NOT be used for anything other than UI. 461 // As its name suggests, this should NOT be used for anything other than UI.
461 bool is_auth_in_progress_; 462 bool is_auth_in_progress_;
462 463
463 SyncSetupWizard wizard_; 464 SyncSetupWizard wizard_;
464 465
465 // Encapsulates user signin with TokenService. 466 // Encapsulates user signin with TokenService.
466 SigninManager signin_; 467 scoped_ptr<SigninManager> signin_;
467 468
468 // True if an unrecoverable error (e.g. violation of an assumed invariant) 469 // True if an unrecoverable error (e.g. violation of an assumed invariant)
469 // occurred during syncer operation. This value should be checked before 470 // occurred during syncer operation. This value should be checked before
470 // doing any work that might corrupt things further. 471 // doing any work that might corrupt things further.
471 bool unrecoverable_error_detected_; 472 bool unrecoverable_error_detected_;
472 473
473 // A message sent when an unrecoverable error occurred. 474 // A message sent when an unrecoverable error occurred.
474 std::string unrecoverable_error_message_; 475 std::string unrecoverable_error_message_;
475 scoped_ptr<tracked_objects::Location> unrecoverable_error_location_; 476 scoped_ptr<tracked_objects::Location> unrecoverable_error_location_;
476 477
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // and is necessary because the nudge sync framework can drop nudges for 527 // and is necessary because the nudge sync framework can drop nudges for
527 // a wide variety of sync-related conditions (throttling, connections issues, 528 // a wide variety of sync-related conditions (throttling, connections issues,
528 // syncer paused, etc.). It can only be removed correctly when the framework 529 // syncer paused, etc.). It can only be removed correctly when the framework
529 // is reworked to allow one-shot commands like clearing server data. 530 // is reworked to allow one-shot commands like clearing server data.
530 base::OneShotTimer<ProfileSyncService> clear_server_data_timer_; 531 base::OneShotTimer<ProfileSyncService> clear_server_data_timer_;
531 532
532 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); 533 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
533 }; 534 };
534 535
535 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ 536 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/personal_options_handler.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698