| OLD | NEW |
| 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // be in the routing_info map. We set them to group passive, meaning that | 123 // be in the routing_info map. We set them to group passive, meaning that |
| 124 // updates will be applied, but not dispatched to the UI thread yet. | 124 // updates will be applied, but not dispatched to the UI thread yet. |
| 125 for (syncable::ModelTypeSet::const_iterator it = types.begin(); | 125 for (syncable::ModelTypeSet::const_iterator it = types.begin(); |
| 126 it != types.end(); ++it) { | 126 it != types.end(); ++it) { |
| 127 registrar_.routing_info[(*it)] = GROUP_PASSIVE; | 127 registrar_.routing_info[(*it)] = GROUP_PASSIVE; |
| 128 } | 128 } |
| 129 | 129 |
| 130 // TODO(tim): Remove this special case once NIGORI is populated by | 130 // TODO(tim): Remove this special case once NIGORI is populated by |
| 131 // default. We piggy back off of the passwords flag for now to not | 131 // default. We piggy back off of the passwords flag for now to not |
| 132 // require both encryption and passwords flags. | 132 // require both encryption and passwords flags. |
| 133 bool enable_encryption = CommandLine::ForCurrentProcess()->HasSwitch( | 133 bool enable_encryption = !CommandLine::ForCurrentProcess()->HasSwitch( |
| 134 switches::kEnableSyncPasswords) || types.count(syncable::PASSWORDS); | 134 switches::kDisableSyncPasswords) || types.count(syncable::PASSWORDS); |
| 135 if (enable_encryption) | 135 if (enable_encryption) |
| 136 registrar_.routing_info[syncable::NIGORI] = GROUP_PASSIVE; | 136 registrar_.routing_info[syncable::NIGORI] = GROUP_PASSIVE; |
| 137 | 137 |
| 138 InitCore(Core::DoInitializeOptions( | 138 InitCore(Core::DoInitializeOptions( |
| 139 sync_service_url, | 139 sync_service_url, |
| 140 MakeHttpBridgeFactory(baseline_context_getter), | 140 MakeHttpBridgeFactory(baseline_context_getter), |
| 141 credentials, | 141 credentials, |
| 142 delete_sync_data_folder, | 142 delete_sync_data_folder, |
| 143 notifier_options, | 143 notifier_options, |
| 144 RestoreEncryptionBootstrapToken(), | 144 RestoreEncryptionBootstrapToken(), |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 } | 893 } |
| 894 | 894 |
| 895 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 895 void SyncBackendHost::Core::DeleteSyncDataFolder() { |
| 896 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 896 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { |
| 897 if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 897 if (!file_util::Delete(host_->sync_data_folder_path(), true)) |
| 898 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 898 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
| 899 } | 899 } |
| 900 } | 900 } |
| 901 | 901 |
| 902 } // namespace browser_sync | 902 } // namespace browser_sync |
| OLD | NEW |