| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 113   // be in the routing_info map.  We set them to group passive, meaning that | 113   // be in the routing_info map.  We set them to group passive, meaning that | 
| 114   // updates will be applied, but not dispatched to the UI thread yet. | 114   // updates will be applied, but not dispatched to the UI thread yet. | 
| 115   for (syncable::ModelTypeSet::const_iterator it = types.begin(); | 115   for (syncable::ModelTypeSet::const_iterator it = types.begin(); | 
| 116       it != types.end(); ++it) { | 116       it != types.end(); ++it) { | 
| 117     registrar_.routing_info[(*it)] = GROUP_PASSIVE; | 117     registrar_.routing_info[(*it)] = GROUP_PASSIVE; | 
| 118   } | 118   } | 
| 119 | 119 | 
| 120   // TODO(tim): Remove this special case once NIGORI is populated by | 120   // TODO(tim): Remove this special case once NIGORI is populated by | 
| 121   // default.  We piggy back off of the passwords flag for now to not | 121   // default.  We piggy back off of the passwords flag for now to not | 
| 122   // require both encryption and passwords flags. | 122   // require both encryption and passwords flags. | 
| 123   bool enable_encryption = CommandLine::ForCurrentProcess()->HasSwitch( | 123   bool enable_encryption = !CommandLine::ForCurrentProcess()->HasSwitch( | 
| 124       switches::kEnableSyncPasswords) || types.count(syncable::PASSWORDS); | 124       switches::kDisableSyncPasswords) || types.count(syncable::PASSWORDS) > 0; | 
| 125   if (enable_encryption) | 125   if (enable_encryption) | 
| 126     registrar_.routing_info[syncable::NIGORI] = GROUP_PASSIVE; | 126     registrar_.routing_info[syncable::NIGORI] = GROUP_PASSIVE; | 
| 127 | 127 | 
| 128   InitCore(Core::DoInitializeOptions( | 128   InitCore(Core::DoInitializeOptions( | 
| 129       sync_service_url, | 129       sync_service_url, | 
| 130       MakeHttpBridgeFactory(baseline_context_getter), | 130       MakeHttpBridgeFactory(baseline_context_getter), | 
| 131       credentials, | 131       credentials, | 
| 132       delete_sync_data_folder, | 132       delete_sync_data_folder, | 
| 133       notifier_options, | 133       notifier_options, | 
| 134       RestoreEncryptionBootstrapToken(), | 134       RestoreEncryptionBootstrapToken(), | 
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 806 } | 806 } | 
| 807 | 807 | 
| 808 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 808 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 
| 809   if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 809   if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 
| 810     if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 810     if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 
| 811       LOG(DFATAL) << "Could not delete the Sync Data folder."; | 811       LOG(DFATAL) << "Could not delete the Sync Data folder."; | 
| 812   } | 812   } | 
| 813 } | 813 } | 
| 814 | 814 | 
| 815 }  // namespace browser_sync | 815 }  // namespace browser_sync | 
| OLD | NEW | 
|---|