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 "chrome/browser/sync/about_sync_util.h" | 5 #include "chrome/browser/sync/about_sync_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 ListValue* section_credentials = AddSection(stats_list, kCredentialsTitle); | 181 ListValue* section_credentials = AddSection(stats_list, kCredentialsTitle); |
182 StringSyncStat client_id(section_credentials, "Client ID"); | 182 StringSyncStat client_id(section_credentials, "Client ID"); |
183 StringSyncStat username(section_credentials, "Username"); | 183 StringSyncStat username(section_credentials, "Username"); |
184 BoolSyncStat is_token_available(section_credentials, "Sync Token Available"); | 184 BoolSyncStat is_token_available(section_credentials, "Sync Token Available"); |
185 | 185 |
186 ListValue* section_local = AddSection(stats_list, "Local State"); | 186 ListValue* section_local = AddSection(stats_list, "Local State"); |
187 StringSyncStat last_synced(section_local, "Last Synced"); | 187 StringSyncStat last_synced(section_local, "Last Synced"); |
188 BoolSyncStat is_setup_complete(section_local, | 188 BoolSyncStat is_setup_complete(section_local, |
189 "Sync First-Time Setup Complete"); | 189 "Sync First-Time Setup Complete"); |
190 BoolSyncStat is_backend_initialized(section_local, | 190 StringSyncStat backend_initialization(section_local, |
191 "Sync Backend Initialized"); | 191 "Sync Backend Initialization"); |
192 BoolSyncStat is_syncing(section_local, "Syncing"); | 192 BoolSyncStat is_syncing(section_local, "Syncing"); |
193 | 193 |
194 ListValue* section_network = AddSection(stats_list, "Network"); | 194 ListValue* section_network = AddSection(stats_list, "Network"); |
195 BoolSyncStat is_throttled(section_network, "Throttled"); | 195 BoolSyncStat is_throttled(section_network, "Throttled"); |
196 BoolSyncStat are_notifications_enabled(section_network, | 196 BoolSyncStat are_notifications_enabled(section_network, |
197 "Notifications Enabled"); | 197 "Notifications Enabled"); |
198 | 198 |
199 ListValue* section_encryption = AddSection(stats_list, "Encryption"); | 199 ListValue* section_encryption = AddSection(stats_list, "Encryption"); |
200 BoolSyncStat is_using_explicit_passphrase(section_encryption, | 200 BoolSyncStat is_using_explicit_passphrase(section_encryption, |
201 "Explicit Passphrase"); | 201 "Explicit Passphrase"); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 server_url.SetValue(service->sync_service_url().spec()); | 289 server_url.SetValue(service->sync_service_url().spec()); |
290 | 290 |
291 if (is_status_valid && !full_status.unique_id.empty()) | 291 if (is_status_valid && !full_status.unique_id.empty()) |
292 client_id.SetValue(full_status.unique_id); | 292 client_id.SetValue(full_status.unique_id); |
293 if (service->signin()) | 293 if (service->signin()) |
294 username.SetValue(service->signin()->GetAuthenticatedUsername()); | 294 username.SetValue(service->signin()->GetAuthenticatedUsername()); |
295 is_token_available.SetValue(service->IsSyncTokenAvailable()); | 295 is_token_available.SetValue(service->IsSyncTokenAvailable()); |
296 | 296 |
297 last_synced.SetValue(service->GetLastSyncedTimeString()); | 297 last_synced.SetValue(service->GetLastSyncedTimeString()); |
298 is_setup_complete.SetValue(service->HasSyncSetupCompleted()); | 298 is_setup_complete.SetValue(service->HasSyncSetupCompleted()); |
299 is_backend_initialized.SetValue(sync_initialized); | 299 backend_initialization.SetValue( |
| 300 service->GetBackendInitializationStateString()); |
300 if (is_status_valid) { | 301 if (is_status_valid) { |
301 is_syncing.SetValue(full_status.syncing); | 302 is_syncing.SetValue(full_status.syncing); |
302 } | 303 } |
303 | 304 |
304 if (snapshot.is_initialized()) | 305 if (snapshot.is_initialized()) |
305 is_throttled.SetValue(snapshot.is_silenced()); | 306 is_throttled.SetValue(snapshot.is_silenced()); |
306 if (is_status_valid) { | 307 if (is_status_valid) { |
307 are_notifications_enabled.SetValue( | 308 are_notifications_enabled.SetValue( |
308 full_status.notifications_enabled); | 309 full_status.notifications_enabled); |
309 } | 310 } |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 about_info->SetString("unrecoverable_error_message", | 430 about_info->SetString("unrecoverable_error_message", |
430 unrecoverable_error_message); | 431 unrecoverable_error_message); |
431 } | 432 } |
432 | 433 |
433 about_info->Set("type_status", service->GetTypeStatusMap()); | 434 about_info->Set("type_status", service->GetTypeStatusMap()); |
434 | 435 |
435 return about_info.Pass(); | 436 return about_info.Pass(); |
436 } | 437 } |
437 | 438 |
438 } // namespace sync_ui_util | 439 } // namespace sync_ui_util |
OLD | NEW |