| OLD | NEW |
| 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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 if (pre_commit_update_avoidance_node.InitByClientTagLookup( | 963 if (pre_commit_update_avoidance_node.InitByClientTagLookup( |
| 964 syncer::EXPERIMENTS, | 964 syncer::EXPERIMENTS, |
| 965 syncer::kPreCommitUpdateAvoidanceTag) == BaseNode::INIT_OK) { | 965 syncer::kPreCommitUpdateAvoidanceTag) == BaseNode::INIT_OK) { |
| 966 session_context_->set_server_enabled_pre_commit_update_avoidance( | 966 session_context_->set_server_enabled_pre_commit_update_avoidance( |
| 967 pre_commit_update_avoidance_node.GetExperimentsSpecifics(). | 967 pre_commit_update_avoidance_node.GetExperimentsSpecifics(). |
| 968 pre_commit_update_avoidance().enabled()); | 968 pre_commit_update_avoidance().enabled()); |
| 969 // We don't bother setting found_experiment. The frontend doesn't need to | 969 // We don't bother setting found_experiment. The frontend doesn't need to |
| 970 // know about this. | 970 // know about this. |
| 971 } | 971 } |
| 972 | 972 |
| 973 ReadNode gcm_channel_node(&trans); | |
| 974 if (gcm_channel_node.InitByClientTagLookup( | |
| 975 syncer::EXPERIMENTS, | |
| 976 syncer::kGCMChannelTag) == BaseNode::INIT_OK && | |
| 977 gcm_channel_node.GetExperimentsSpecifics().gcm_channel().has_enabled()) { | |
| 978 experiments->gcm_channel_state = | |
| 979 (gcm_channel_node.GetExperimentsSpecifics().gcm_channel().enabled() ? | |
| 980 syncer::Experiments::ENABLED : syncer::Experiments::SUPPRESSED); | |
| 981 found_experiment = true; | |
| 982 } | |
| 983 | |
| 984 ReadNode enhanced_bookmarks_node(&trans); | 973 ReadNode enhanced_bookmarks_node(&trans); |
| 985 if (enhanced_bookmarks_node.InitByClientTagLookup( | 974 if (enhanced_bookmarks_node.InitByClientTagLookup( |
| 986 syncer::EXPERIMENTS, syncer::kEnhancedBookmarksTag) == | 975 syncer::EXPERIMENTS, syncer::kEnhancedBookmarksTag) == |
| 987 BaseNode::INIT_OK && | 976 BaseNode::INIT_OK && |
| 988 enhanced_bookmarks_node.GetExperimentsSpecifics() | 977 enhanced_bookmarks_node.GetExperimentsSpecifics() |
| 989 .has_enhanced_bookmarks()) { | 978 .has_enhanced_bookmarks()) { |
| 990 const sync_pb::EnhancedBookmarksFlags& enhanced_bookmarks = | 979 const sync_pb::EnhancedBookmarksFlags& enhanced_bookmarks = |
| 991 enhanced_bookmarks_node.GetExperimentsSpecifics().enhanced_bookmarks(); | 980 enhanced_bookmarks_node.GetExperimentsSpecifics().enhanced_bookmarks(); |
| 992 if (enhanced_bookmarks.has_enabled()) | 981 if (enhanced_bookmarks.has_enabled()) |
| 993 experiments->enhanced_bookmarks_enabled = enhanced_bookmarks.enabled(); | 982 experiments->enhanced_bookmarks_enabled = enhanced_bookmarks.enabled(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 bool SyncManagerImpl::HasDirectoryTypeDebugInfoObserver( | 1040 bool SyncManagerImpl::HasDirectoryTypeDebugInfoObserver( |
| 1052 syncer::TypeDebugInfoObserver* observer) { | 1041 syncer::TypeDebugInfoObserver* observer) { |
| 1053 return model_type_registry_->HasDirectoryTypeDebugInfoObserver(observer); | 1042 return model_type_registry_->HasDirectoryTypeDebugInfoObserver(observer); |
| 1054 } | 1043 } |
| 1055 | 1044 |
| 1056 void SyncManagerImpl::RequestEmitDebugInfo() { | 1045 void SyncManagerImpl::RequestEmitDebugInfo() { |
| 1057 model_type_registry_->RequestEmitDebugInfo(); | 1046 model_type_registry_->RequestEmitDebugInfo(); |
| 1058 } | 1047 } |
| 1059 | 1048 |
| 1060 } // namespace syncer | 1049 } // namespace syncer |
| OLD | NEW |