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

Side by Side Diff: sync/internal_api/sync_manager_impl.cc

Issue 875243003: Add sync experiment flag for wallet datatype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 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 | « sync/internal_api/public/util/experiments.h ('k') | sync/protocol/experiments_specifics.proto » ('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) 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 "sync/internal_api/sync_manager_impl.h" 5 #include "sync/internal_api/sync_manager_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 syncer::EXPERIMENTS, syncer::kGCMInvalidationsTag) == 1003 syncer::EXPERIMENTS, syncer::kGCMInvalidationsTag) ==
1004 BaseNode::INIT_OK) { 1004 BaseNode::INIT_OK) {
1005 const sync_pb::GcmInvalidationsFlags& gcm_invalidations = 1005 const sync_pb::GcmInvalidationsFlags& gcm_invalidations =
1006 gcm_invalidations_node.GetExperimentsSpecifics().gcm_invalidations(); 1006 gcm_invalidations_node.GetExperimentsSpecifics().gcm_invalidations();
1007 if (gcm_invalidations.has_enabled()) { 1007 if (gcm_invalidations.has_enabled()) {
1008 experiments->gcm_invalidations_enabled = gcm_invalidations.enabled(); 1008 experiments->gcm_invalidations_enabled = gcm_invalidations.enabled();
1009 found_experiment = true; 1009 found_experiment = true;
1010 } 1010 }
1011 } 1011 }
1012 1012
1013 ReadNode wallet_sync_node(&trans);
1014 if (wallet_sync_node.InitByClientTagLookup(
1015 syncer::EXPERIMENTS, syncer::kWalletSyncTag) == BaseNode::INIT_OK) {
1016 const sync_pb::WalletSyncFlags& wallet_sync =
1017 wallet_sync_node.GetExperimentsSpecifics().wallet_sync();
1018 if (wallet_sync.has_enabled()) {
1019 experiments->wallet_sync_enabled = wallet_sync.enabled();
1020 found_experiment = true;
1021 }
1022 }
1023
1013 return found_experiment; 1024 return found_experiment;
1014 } 1025 }
1015 1026
1016 bool SyncManagerImpl::HasUnsyncedItems() { 1027 bool SyncManagerImpl::HasUnsyncedItems() {
1017 ReadTransaction trans(FROM_HERE, GetUserShare()); 1028 ReadTransaction trans(FROM_HERE, GetUserShare());
1018 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); 1029 return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0);
1019 } 1030 }
1020 1031
1021 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() { 1032 SyncEncryptionHandler* SyncManagerImpl::GetEncryptionHandler() {
1022 return sync_encryption_handler_.get(); 1033 return sync_encryption_handler_.get();
(...skipping 17 matching lines...) Expand all
1040 bool SyncManagerImpl::HasDirectoryTypeDebugInfoObserver( 1051 bool SyncManagerImpl::HasDirectoryTypeDebugInfoObserver(
1041 syncer::TypeDebugInfoObserver* observer) { 1052 syncer::TypeDebugInfoObserver* observer) {
1042 return model_type_registry_->HasDirectoryTypeDebugInfoObserver(observer); 1053 return model_type_registry_->HasDirectoryTypeDebugInfoObserver(observer);
1043 } 1054 }
1044 1055
1045 void SyncManagerImpl::RequestEmitDebugInfo() { 1056 void SyncManagerImpl::RequestEmitDebugInfo() {
1046 model_type_registry_->RequestEmitDebugInfo(); 1057 model_type_registry_->RequestEmitDebugInfo();
1047 } 1058 }
1048 1059
1049 } // namespace syncer 1060 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/public/util/experiments.h ('k') | sync/protocol/experiments_specifics.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698