| 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 "chrome/browser/sync/sync_ui_util.h" | 5 #include "chrome/browser/sync/sync_ui_util.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/i18n/number_formatting.h" | 9 #include "base/i18n/number_formatting.h" |
| 10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 return "USER_NOT_SIGNED_UP"; | 274 return "USER_NOT_SIGNED_UP"; |
| 275 case GoogleServiceAuthError::CONNECTION_FAILED: | 275 case GoogleServiceAuthError::CONNECTION_FAILED: |
| 276 return "CONNECTION_FAILED"; | 276 return "CONNECTION_FAILED"; |
| 277 default: | 277 default: |
| 278 return std::string(); | 278 return std::string(); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 void ConstructAboutInformation(ProfileSyncService* service, | 282 void ConstructAboutInformation(ProfileSyncService* service, |
| 283 DictionaryValue* strings) { | 283 DictionaryValue* strings) { |
| 284 CHECK(strings != NULL); | 284 CHECK(strings); |
| 285 if (!service->HasSyncSetupCompleted()) { | 285 if (!service || !service->HasSyncSetupCompleted()) { |
| 286 strings->SetString("summary", "SYNC DISABLED"); | 286 strings->SetString("summary", "SYNC DISABLED"); |
| 287 } else { | 287 } else { |
| 288 sync_api::SyncManager::Status full_status( | 288 sync_api::SyncManager::Status full_status( |
| 289 service->QueryDetailedSyncStatus()); | 289 service->QueryDetailedSyncStatus()); |
| 290 | 290 |
| 291 strings->SetString("service_url", service->sync_service_url().spec()); | 291 strings->SetString("service_url", service->sync_service_url().spec()); |
| 292 strings->SetString("summary", | 292 strings->SetString("summary", |
| 293 ProfileSyncService::BuildSyncStatusSummaryText( | 293 ProfileSyncService::BuildSyncStatusSummaryText( |
| 294 full_status.summary)); | 294 full_status.summary)); |
| 295 | 295 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 DictionaryValue* val = new DictionaryValue; | 397 DictionaryValue* val = new DictionaryValue; |
| 398 val->SetString("stat_name", "Autofill Migration Time"); | 398 val->SetString("stat_name", "Autofill Migration Time"); |
| 399 val->SetString("stat_value", ConstructTime(info.autofill_migration_time)); | 399 val->SetString("stat_value", ConstructTime(info.autofill_migration_time)); |
| 400 details->Append(val); | 400 details->Append(val); |
| 401 } | 401 } |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace sync_ui_util | 405 } // namespace sync_ui_util |
| OLD | NEW |