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

Side by Side Diff: components/browser_sync/browser/profile_sync_service.cc

Issue 2279713002: Make PassphraseType a "enum class" instead of "enum". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix java Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "components/browser_sync/browser/profile_sync_service.h" 5 #include "components/browser_sync/browser/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 for (DataTypeController::TypeMap::const_iterator it = 1724 for (DataTypeController::TypeMap::const_iterator it =
1725 data_type_controllers_.begin(); 1725 data_type_controllers_.begin();
1726 it != data_type_controllers_.end(); ++it) { 1726 it != data_type_controllers_.end(); ++it) {
1727 registered_types.Put(it->first); 1727 registered_types.Put(it->first);
1728 } 1728 }
1729 return registered_types; 1729 return registered_types;
1730 } 1730 }
1731 1731
1732 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { 1732 bool ProfileSyncService::IsUsingSecondaryPassphrase() const {
1733 syncer::PassphraseType passphrase_type = GetPassphraseType(); 1733 syncer::PassphraseType passphrase_type = GetPassphraseType();
1734 return passphrase_type == syncer::FROZEN_IMPLICIT_PASSPHRASE || 1734 return passphrase_type ==
1735 passphrase_type == syncer::CUSTOM_PASSPHRASE; 1735 syncer::PassphraseType::FROZEN_IMPLICIT_PASSPHRASE ||
1736 passphrase_type == syncer::PassphraseType::CUSTOM_PASSPHRASE;
1736 } 1737 }
1737 1738
1738 std::string ProfileSyncService::GetCustomPassphraseKey() const { 1739 std::string ProfileSyncService::GetCustomPassphraseKey() const {
1739 sync_driver::SystemEncryptor encryptor; 1740 sync_driver::SystemEncryptor encryptor;
1740 syncer::Cryptographer cryptographer(&encryptor); 1741 syncer::Cryptographer cryptographer(&encryptor);
1741 cryptographer.Bootstrap(sync_prefs_.GetEncryptionBootstrapToken()); 1742 cryptographer.Bootstrap(sync_prefs_.GetEncryptionBootstrapToken());
1742 return cryptographer.GetDefaultNigoriKeyData(); 1743 return cryptographer.GetDefaultNigoriKeyData();
1743 } 1744 }
1744 1745
1745 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { 1746 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const {
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 if (--outstanding_setup_in_progress_handles_ != 0) 2536 if (--outstanding_setup_in_progress_handles_ != 0)
2536 return; 2537 return;
2537 2538
2538 DCHECK(startup_controller_->IsSetupInProgress()); 2539 DCHECK(startup_controller_->IsSetupInProgress());
2539 startup_controller_->SetSetupInProgress(false); 2540 startup_controller_->SetSetupInProgress(false);
2540 2541
2541 if (IsBackendInitialized()) 2542 if (IsBackendInitialized())
2542 ReconfigureDatatypeManager(); 2543 ReconfigureDatatypeManager();
2543 NotifyObservers(); 2544 NotifyObservers();
2544 } 2545 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler_unittest.cc ('k') | components/sync/core/sync_encryption_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698