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

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

Issue 8587017: [Sync] Add version info to about:sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/sync_internals/about.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/sync/profile_sync_service.h" 13 #include "chrome/browser/sync/profile_sync_service.h"
14 #include "chrome/browser/sync/protocol/proto_enum_conversions.h" 14 #include "chrome/browser/sync/protocol/proto_enum_conversions.h"
15 #include "chrome/browser/sync/protocol/sync_protocol_error.h" 15 #include "chrome/browser/sync/protocol/sync_protocol_error.h"
16 #include "chrome/browser/sync/syncable/model_type.h" 16 #include "chrome/browser/sync/syncable/model_type.h"
17 #include "chrome/browser/sync/sessions/session_state.h" 17 #include "chrome/browser/sync/sessions/session_state.h"
18 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/chrome_version_info.h"
21 #include "chrome/common/net/gaia/google_service_auth_error.h" 22 #include "chrome/common/net/gaia/google_service_auth_error.h"
22 #include "chrome/common/url_constants.h" 23 #include "chrome/common/url_constants.h"
23 #include "grit/browser_resources.h" 24 #include "grit/browser_resources.h"
24 #include "grit/chromium_strings.h" 25 #include "grit/chromium_strings.h"
25 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
26 #include "grit/locale_settings.h" 27 #include "grit/locale_settings.h"
27 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/resource/resource_bundle.h" 29 #include "ui/base/resource/resource_bundle.h"
29 30
30 typedef GoogleServiceAuthError AuthError; 31 typedef GoogleServiceAuthError AuthError;
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 strings->SetString("summary", "SYNC DISABLED"); 485 strings->SetString("summary", "SYNC DISABLED");
485 } else { 486 } else {
486 sync_api::SyncManager::Status full_status( 487 sync_api::SyncManager::Status full_status(
487 service->QueryDetailedSyncStatus()); 488 service->QueryDetailedSyncStatus());
488 489
489 strings->SetString("service_url", service->sync_service_url().spec()); 490 strings->SetString("service_url", service->sync_service_url().spec());
490 strings->SetString("summary", 491 strings->SetString("summary",
491 ProfileSyncService::BuildSyncStatusSummaryText( 492 ProfileSyncService::BuildSyncStatusSummaryText(
492 full_status.summary)); 493 full_status.summary));
493 494
495 chrome::VersionInfo chrome_version;
496 strings->SetString("version", chrome_version.Name() + " " +
akalin 2011/11/17 02:35:02 Does this have more information than the user agen
Nicolas Zea 2011/11/17 03:59:16 Hmm, wasn't aware of that. Interestingly, sync_bac
497 chrome_version.Version() + " (" + chrome_version.OSType() + ") " +
498 chrome_version.GetVersionStringModifier());
494 strings->Set("authenticated", 499 strings->Set("authenticated",
495 new base::FundamentalValue(full_status.authenticated)); 500 new base::FundamentalValue(full_status.authenticated));
496 strings->SetString("auth_problem", 501 strings->SetString("auth_problem",
497 sync_ui_util::MakeSyncAuthErrorText( 502 sync_ui_util::MakeSyncAuthErrorText(
498 service->GetAuthError().state())); 503 service->GetAuthError().state()));
499 504
500 strings->SetString("time_since_sync", service->GetLastSyncedTimeString()); 505 strings->SetString("time_since_sync", service->GetLastSyncedTimeString());
501 506
502 ListValue* details = new ListValue(); 507 ListValue* details = new ListValue();
503 strings->Set("details", details); 508 strings->Set("details", details);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 DictionaryValue* val = new DictionaryValue; 662 DictionaryValue* val = new DictionaryValue;
658 val->SetString("model_type", ModelTypeToString(it->first)); 663 val->SetString("model_type", ModelTypeToString(it->first));
659 val->SetString("group", ModelSafeGroupToString(it->second)); 664 val->SetString("group", ModelSafeGroupToString(it->second));
660 routing_info->Append(val); 665 routing_info->Append(val);
661 } 666 }
662 } 667 }
663 } 668 }
664 } 669 }
665 670
666 } // namespace sync_ui_util 671 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/resources/sync_internals/about.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698