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

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: rebase 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
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('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) 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "chrome/browser/profiles/profile_shortcut_manager.h" 45 #include "chrome/browser/profiles/profile_shortcut_manager.h"
46 #include "chrome/browser/profiles/profile_window.h" 46 #include "chrome/browser/profiles/profile_window.h"
47 #include "chrome/browser/profiles/profiles_state.h" 47 #include "chrome/browser/profiles/profiles_state.h"
48 #include "chrome/browser/search/hotword_audio_history_handler.h" 48 #include "chrome/browser/search/hotword_audio_history_handler.h"
49 #include "chrome/browser/search/hotword_service.h" 49 #include "chrome/browser/search/hotword_service.h"
50 #include "chrome/browser/search/hotword_service_factory.h" 50 #include "chrome/browser/search/hotword_service_factory.h"
51 #include "chrome/browser/search/search.h" 51 #include "chrome/browser/search/search.h"
52 #include "chrome/browser/search_engines/template_url_service_factory.h" 52 #include "chrome/browser/search_engines/template_url_service_factory.h"
53 #include "chrome/browser/signin/easy_unlock_service.h" 53 #include "chrome/browser/signin/easy_unlock_service.h"
54 #include "chrome/browser/signin/signin_manager_factory.h" 54 #include "chrome/browser/signin/signin_manager_factory.h"
55 #include "chrome/browser/signin/signin_ui_util.h"
55 #include "chrome/browser/sync/profile_sync_service_factory.h" 56 #include "chrome/browser/sync/profile_sync_service_factory.h"
56 #include "chrome/browser/sync/sync_ui_util.h" 57 #include "chrome/browser/sync/sync_ui_util.h"
57 #include "chrome/browser/themes/theme_service.h" 58 #include "chrome/browser/themes/theme_service.h"
58 #include "chrome/browser/themes/theme_service_factory.h" 59 #include "chrome/browser/themes/theme_service_factory.h"
59 #include "chrome/browser/ui/browser_finder.h" 60 #include "chrome/browser/ui/browser_finder.h"
60 #include "chrome/browser/ui/chrome_select_file_policy.h" 61 #include "chrome/browser/ui/chrome_select_file_policy.h"
61 #include "chrome/browser/ui/passwords/manage_passwords_view_utils_desktop.h" 62 #include "chrome/browser/ui/passwords/manage_passwords_view_utils_desktop.h"
62 #include "chrome/browser/ui/webui/favicon_source.h" 63 #include "chrome/browser/ui/webui/favicon_source.h"
63 #include "chrome/browser/ui/webui/profile_helper.h" 64 #include "chrome/browser/ui/webui/profile_helper.h"
64 #include "chrome/common/chrome_constants.h" 65 #include "chrome/common/chrome_constants.h"
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 bool status_has_error = 1554 bool status_has_error =
1554 sync_ui_util::GetStatusLabels(profile, service, *signin, 1555 sync_ui_util::GetStatusLabels(profile, service, *signin,
1555 sync_ui_util::WITH_HTML, &status_label, 1556 sync_ui_util::WITH_HTML, &status_label,
1556 &link_label) == sync_ui_util::SYNC_ERROR; 1557 &link_label) == sync_ui_util::SYNC_ERROR;
1557 sync_status->SetString("statusText", status_label); 1558 sync_status->SetString("statusText", status_label);
1558 sync_status->SetString("actionLinkText", link_label); 1559 sync_status->SetString("actionLinkText", link_label);
1559 sync_status->SetBoolean("hasError", status_has_error); 1560 sync_status->SetBoolean("hasError", status_has_error);
1560 1561
1561 sync_status->SetBoolean("managed", service && service->IsManaged()); 1562 sync_status->SetBoolean("managed", service && service->IsManaged());
1562 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); 1563 sync_status->SetBoolean("signedIn", signin->IsAuthenticated());
1564 sync_status->SetString("accountInfo",
1565 l10n_util::GetStringFUTF16(
1566 IDS_SYNC_ACCOUNT_INFO,
1567 signin_ui_util::GetAuthenticatedUsername(signin)));
1563 sync_status->SetBoolean("hasUnrecoverableError", 1568 sync_status->SetBoolean("hasUnrecoverableError",
1564 service && service->HasUnrecoverableError()); 1569 service && service->HasUnrecoverableError());
1565 1570
1566 return sync_status; 1571 return sync_status;
1567 } 1572 }
1568 1573
1569 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1574 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1570 const base::ListValue* args) { 1575 const base::ListValue* args) {
1571 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1576 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1572 select_folder_dialog_ = ui::SelectFileDialog::Create( 1577 select_folder_dialog_ = ui::SelectFileDialog::Create(
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 2234
2230 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2235 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2231 #if defined(OS_CHROMEOS) 2236 #if defined(OS_CHROMEOS)
2232 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2237 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2233 #else 2238 #else
2234 return true; 2239 return true;
2235 #endif 2240 #endif
2236 } 2241 }
2237 2242
2238 } // namespace options 2243 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698