OLD | NEW |
---|---|
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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1539 sync_status->SetBoolean("signoutAllowed", !signout_prohibited); | 1539 sync_status->SetBoolean("signoutAllowed", !signout_prohibited); |
1540 sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed()); | 1540 sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed()); |
1541 sync_status->SetBoolean("syncSystemEnabled", (service != NULL)); | 1541 sync_status->SetBoolean("syncSystemEnabled", (service != NULL)); |
1542 sync_status->SetBoolean("setupCompleted", | 1542 sync_status->SetBoolean("setupCompleted", |
1543 service && service->IsFirstSetupComplete()); | 1543 service && service->IsFirstSetupComplete()); |
1544 sync_status->SetBoolean("setupInProgress", | 1544 sync_status->SetBoolean("setupInProgress", |
1545 service && !service->IsManaged() && service->IsFirstSetupInProgress()); | 1545 service && !service->IsManaged() && service->IsFirstSetupInProgress()); |
1546 | 1546 |
1547 base::string16 status_label; | 1547 base::string16 status_label; |
1548 base::string16 link_label; | 1548 base::string16 link_label; |
1549 sync_ui_util::ActionType actionType = sync_ui_util::NO_ACTION; | |
Dan Beam
2016/11/04 17:31:59
nit: action_type
Moe
2016/11/04 21:34:09
Done.
| |
1549 bool status_has_error = | 1550 bool status_has_error = |
1550 sync_ui_util::GetStatusLabels(profile, service, *signin, | 1551 sync_ui_util::GetStatusLabels(profile, service, *signin, |
1551 sync_ui_util::WITH_HTML, &status_label, | 1552 sync_ui_util::WITH_HTML, &status_label, |
1552 &link_label) == sync_ui_util::SYNC_ERROR; | 1553 &link_label, &actionType) == |
1554 sync_ui_util::SYNC_ERROR; | |
1553 sync_status->SetString("statusText", status_label); | 1555 sync_status->SetString("statusText", status_label); |
1554 sync_status->SetString("actionLinkText", link_label); | 1556 sync_status->SetString("actionLinkText", link_label); |
1555 sync_status->SetBoolean("hasError", status_has_error); | 1557 sync_status->SetBoolean("hasError", status_has_error); |
1556 | 1558 |
1557 sync_status->SetBoolean("managed", service && service->IsManaged()); | 1559 sync_status->SetBoolean("managed", service && service->IsManaged()); |
1558 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); | 1560 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); |
1559 sync_status->SetString("accountInfo", | 1561 sync_status->SetString("accountInfo", |
1560 l10n_util::GetStringFUTF16( | 1562 l10n_util::GetStringFUTF16( |
1561 IDS_SYNC_ACCOUNT_INFO, | 1563 IDS_SYNC_ACCOUNT_INFO, |
1562 signin_ui_util::GetAuthenticatedUsername(signin))); | 1564 signin_ui_util::GetAuthenticatedUsername(signin))); |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2229 | 2231 |
2230 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2232 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2231 #if defined(OS_CHROMEOS) | 2233 #if defined(OS_CHROMEOS) |
2232 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2234 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2233 #else | 2235 #else |
2234 return true; | 2236 return true; |
2235 #endif | 2237 #endif |
2236 } | 2238 } |
2237 | 2239 |
2238 } // namespace options | 2240 } // namespace options |
OLD | NEW |