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

Side by Side Diff: chrome/browser/dom_ui/personal_options_handler.cc

Issue 3030047: Convert a bunch of wstring/wchar_t*'s, mostly in browser_about_handler.cc. (Closed)
Patch Set: added TODO Created 10 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
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | 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) 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/dom_ui/personal_options_handler.h" 5 #include "chrome/browser/dom_ui/personal_options_handler.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 "getSyncStatus", 96 "getSyncStatus",
97 NewCallback(this,&PersonalOptionsHandler::SetSyncStatusUIString)); 97 NewCallback(this,&PersonalOptionsHandler::SetSyncStatusUIString));
98 } 98 }
99 99
100 void PersonalOptionsHandler::SetSyncStatusUIString(const Value* value) { 100 void PersonalOptionsHandler::SetSyncStatusUIString(const Value* value) {
101 DCHECK(dom_ui_); 101 DCHECK(dom_ui_);
102 102
103 ProfileSyncService* service = dom_ui_->GetProfile()->GetProfileSyncService(); 103 ProfileSyncService* service = dom_ui_->GetProfile()->GetProfileSyncService();
104 if(service != NULL && ProfileSyncService::IsSyncEnabled()) { 104 if(service != NULL && ProfileSyncService::IsSyncEnabled()) {
105 scoped_ptr<Value> status_string(Value::CreateStringValue( 105 scoped_ptr<Value> status_string(Value::CreateStringValue(
106 l10n_util::GetStringF(IDS_SYNC_ACCOUNT_SYNCED_TO_USER_WITH_TIME, 106 l10n_util::GetStringFUTF16(IDS_SYNC_ACCOUNT_SYNCED_TO_USER_WITH_TIME,
107 UTF16ToWide(service->GetAuthenticatedUsername()), 107 service->GetAuthenticatedUsername(),
108 service->GetLastSyncedTimeString()))); 108 service->GetLastSyncedTimeString())));
109 109
110 dom_ui_->CallJavascriptFunction( 110 dom_ui_->CallJavascriptFunction(
111 L"PersonalOptions.syncStatusCallback", 111 L"PersonalOptions.syncStatusCallback",
112 *(status_string.get())); 112 *(status_string.get()));
113 } 113 }
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698