Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Side by Side Diff: chrome/browser/sync/sync_ui_util.cc

Issue 7619006: base: Remove using declaration of FundamentalValue as it's no longer necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } else { 342 } else {
343 sync_api::SyncManager::Status full_status( 343 sync_api::SyncManager::Status full_status(
344 service->QueryDetailedSyncStatus()); 344 service->QueryDetailedSyncStatus());
345 345
346 strings->SetString("service_url", service->sync_service_url().spec()); 346 strings->SetString("service_url", service->sync_service_url().spec());
347 strings->SetString("summary", 347 strings->SetString("summary",
348 ProfileSyncService::BuildSyncStatusSummaryText( 348 ProfileSyncService::BuildSyncStatusSummaryText(
349 full_status.summary)); 349 full_status.summary));
350 350
351 strings->Set("authenticated", 351 strings->Set("authenticated",
352 new FundamentalValue(full_status.authenticated)); 352 new base::FundamentalValue(full_status.authenticated));
353 strings->SetString("auth_problem", 353 strings->SetString("auth_problem",
354 sync_ui_util::MakeSyncAuthErrorText( 354 sync_ui_util::MakeSyncAuthErrorText(
355 service->GetAuthError().state())); 355 service->GetAuthError().state()));
356 356
357 strings->SetString("time_since_sync", service->GetLastSyncedTimeString()); 357 strings->SetString("time_since_sync", service->GetLastSyncedTimeString());
358 358
359 ListValue* details = new ListValue(); 359 ListValue* details = new ListValue();
360 strings->Set("details", details); 360 strings->Set("details", details);
361 sync_ui_util::AddBoolSyncDetail(details, "Sync Initialized", 361 sync_ui_util::AddBoolSyncDetail(details, "Sync Initialized",
362 service->sync_initialized()); 362 service->sync_initialized());
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // unsynced However if we query the latest count here we will 461 // unsynced However if we query the latest count here we will
462 // have to hold the transaction which means we cannot display this page 462 // have to hold the transaction which means we cannot display this page
463 // when syncing. 463 // when syncing.
464 sync_ui_util::AddIntSyncDetail(details, "Entries" , 464 sync_ui_util::AddIntSyncDetail(details, "Entries" ,
465 snapshot->num_entries); 465 snapshot->num_entries);
466 sync_ui_util::AddBoolSyncDetail(details, "Throttled", 466 sync_ui_util::AddBoolSyncDetail(details, "Throttled",
467 snapshot->is_silenced); 467 snapshot->is_silenced);
468 } 468 }
469 469
470 if (service->unrecoverable_error_detected()) { 470 if (service->unrecoverable_error_detected()) {
471 strings->Set("unrecoverable_error_detected", new FundamentalValue(true)); 471 strings->Set("unrecoverable_error_detected",
472 new base::FundamentalValue(true));
472 tracked_objects::Location loc(service->unrecoverable_error_location()); 473 tracked_objects::Location loc(service->unrecoverable_error_location());
473 std::string location_str; 474 std::string location_str;
474 loc.Write(true, true, &location_str); 475 loc.Write(true, true, &location_str);
475 std::string unrecoverable_error_message = 476 std::string unrecoverable_error_message =
476 "Unrecoverable error detected at " + location_str + 477 "Unrecoverable error detected at " + location_str +
477 ": " + service->unrecoverable_error_message(); 478 ": " + service->unrecoverable_error_message();
478 strings->SetString("unrecoverable_error_message", 479 strings->SetString("unrecoverable_error_message",
479 unrecoverable_error_message); 480 unrecoverable_error_message);
480 } else if (service->sync_initialized()) { 481 } else if (service->sync_initialized()) {
481 browser_sync::ModelSafeRoutingInfo routes; 482 browser_sync::ModelSafeRoutingInfo routes;
482 service->GetModelSafeRoutingInfo(&routes); 483 service->GetModelSafeRoutingInfo(&routes);
483 ListValue* routing_info = new ListValue(); 484 ListValue* routing_info = new ListValue();
484 strings->Set("routing_info", routing_info); 485 strings->Set("routing_info", routing_info);
485 browser_sync::ModelSafeRoutingInfo::const_iterator it = routes.begin(); 486 browser_sync::ModelSafeRoutingInfo::const_iterator it = routes.begin();
486 for (; it != routes.end(); ++it) { 487 for (; it != routes.end(); ++it) {
487 DictionaryValue* val = new DictionaryValue; 488 DictionaryValue* val = new DictionaryValue;
488 val->SetString("model_type", ModelTypeToString(it->first)); 489 val->SetString("model_type", ModelTypeToString(it->first));
489 val->SetString("group", ModelSafeGroupToString(it->second)); 490 val->SetString("group", ModelSafeGroupToString(it->second));
490 routing_info->Append(val); 491 routing_info->Append(val);
491 } 492 }
492 } 493 }
493 } 494 }
494 } 495 }
495 496
496 } // namespace sync_ui_util 497 } // namespace sync_ui_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698