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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 2393643004: [MD Settings][People] Updates positions of username and sync status message (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
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/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 bool status_has_error = 1556 bool status_has_error =
1557 sync_ui_util::GetStatusLabels(profile, service, *signin, 1557 sync_ui_util::GetStatusLabels(profile, service, *signin,
1558 sync_ui_util::WITH_HTML, &status_label, 1558 sync_ui_util::WITH_HTML, &status_label,
1559 &link_label) == sync_ui_util::SYNC_ERROR; 1559 &link_label) == sync_ui_util::SYNC_ERROR;
1560 sync_status->SetString("statusText", status_label); 1560 sync_status->SetString("statusText", status_label);
1561 sync_status->SetString("actionLinkText", link_label); 1561 sync_status->SetString("actionLinkText", link_label);
1562 sync_status->SetBoolean("hasError", status_has_error); 1562 sync_status->SetBoolean("hasError", status_has_error);
1563 1563
1564 sync_status->SetBoolean("managed", service && service->IsManaged()); 1564 sync_status->SetBoolean("managed", service && service->IsManaged());
1565 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); 1565 sync_status->SetBoolean("signedIn", signin->IsAuthenticated());
1566 sync_status->SetString("syncAccountInfo",
1567 l10n_util::GetStringFUTF16(
1568 IDS_SYNC_ACCOUNT_INFO,
1569 sync_ui_util::GetAuthenticatedUsername(signin)));
1566 sync_status->SetBoolean("hasUnrecoverableError", 1570 sync_status->SetBoolean("hasUnrecoverableError",
1567 service && service->HasUnrecoverableError()); 1571 service && service->HasUnrecoverableError());
1568 1572
1569 return sync_status; 1573 return sync_status;
1570 } 1574 }
1571 1575
1572 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1576 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1573 const base::ListValue* args) { 1577 const base::ListValue* args) {
1574 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1578 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1575 select_folder_dialog_ = ui::SelectFileDialog::Create( 1579 select_folder_dialog_ = ui::SelectFileDialog::Create(
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 2238
2235 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2239 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2236 #if defined(OS_CHROMEOS) 2240 #if defined(OS_CHROMEOS)
2237 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2241 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2238 #else 2242 #else
2239 return true; 2243 return true;
2240 #endif 2244 #endif
2241 } 2245 }
2242 2246
2243 } // namespace options 2247 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698