| 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 "components/sync_driver/sync_prefs.h" | 5 #include "components/sync_driver/sync_prefs.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 case syncer::ARTICLES: | 310 case syncer::ARTICLES: |
| 311 return prefs::kSyncArticles; | 311 return prefs::kSyncArticles; |
| 312 case syncer::SUPERVISED_USER_SHARED_SETTINGS: | 312 case syncer::SUPERVISED_USER_SHARED_SETTINGS: |
| 313 return prefs::kSyncSupervisedUserSharedSettings; | 313 return prefs::kSyncSupervisedUserSharedSettings; |
| 314 case syncer::SUPERVISED_USER_WHITELISTS: | 314 case syncer::SUPERVISED_USER_WHITELISTS: |
| 315 return prefs::kSyncSupervisedUserWhitelists; | 315 return prefs::kSyncSupervisedUserWhitelists; |
| 316 case syncer::DEVICE_INFO: | 316 case syncer::DEVICE_INFO: |
| 317 return prefs::kSyncDeviceInfo; | 317 return prefs::kSyncDeviceInfo; |
| 318 case syncer::WIFI_CREDENTIALS: | 318 case syncer::WIFI_CREDENTIALS: |
| 319 return prefs::kSyncWifiCredentials; | 319 return prefs::kSyncWifiCredentials; |
| 320 case syncer::ARC_PACKAGE: |
| 321 return prefs::kSyncArcPackage; |
| 320 default: | 322 default: |
| 321 break; | 323 break; |
| 322 } | 324 } |
| 323 NOTREACHED() << "Type is " << data_type; | 325 NOTREACHED() << "Type is " << data_type; |
| 324 return NULL; | 326 return NULL; |
| 325 } | 327 } |
| 326 | 328 |
| 327 #if defined(OS_CHROMEOS) | 329 #if defined(OS_CHROMEOS) |
| 328 std::string SyncPrefs::GetSpareBootstrapToken() const { | 330 std::string SyncPrefs::GetSpareBootstrapToken() const { |
| 329 DCHECK(CalledOnValidThread()); | 331 DCHECK(CalledOnValidThread()); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); | 547 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); |
| 546 | 548 |
| 547 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result( | 549 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result( |
| 548 new syncer::SyncEncryptionHandler::NigoriState()); | 550 new syncer::SyncEncryptionHandler::NigoriState()); |
| 549 if (!result->nigori_specifics.ParseFromString(decoded)) | 551 if (!result->nigori_specifics.ParseFromString(decoded)) |
| 550 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); | 552 return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>(); |
| 551 return result; | 553 return result; |
| 552 } | 554 } |
| 553 | 555 |
| 554 } // namespace sync_driver | 556 } // namespace sync_driver |
| OLD | NEW |