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 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 sync_status->SetBoolean("signoutAllowed", !signout_prohibited); | 1544 sync_status->SetBoolean("signoutAllowed", !signout_prohibited); |
1545 sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed()); | 1545 sync_status->SetBoolean("signinAllowed", signin->IsSigninAllowed()); |
1546 sync_status->SetBoolean("syncSystemEnabled", (service != NULL)); | 1546 sync_status->SetBoolean("syncSystemEnabled", (service != NULL)); |
1547 sync_status->SetBoolean("setupCompleted", | 1547 sync_status->SetBoolean("setupCompleted", |
1548 service && service->IsFirstSetupComplete()); | 1548 service && service->IsFirstSetupComplete()); |
1549 sync_status->SetBoolean("setupInProgress", | 1549 sync_status->SetBoolean("setupInProgress", |
1550 service && !service->IsManaged() && service->IsFirstSetupInProgress()); | 1550 service && !service->IsManaged() && service->IsFirstSetupInProgress()); |
1551 | 1551 |
1552 base::string16 status_label; | 1552 base::string16 status_label; |
1553 base::string16 link_label; | 1553 base::string16 link_label; |
| 1554 sync_ui_util::ActionType action_type = sync_ui_util::NO_ACTION; |
1554 bool status_has_error = | 1555 bool status_has_error = |
1555 sync_ui_util::GetStatusLabels(profile, service, *signin, | 1556 sync_ui_util::GetStatusLabels(profile, service, *signin, |
1556 sync_ui_util::WITH_HTML, &status_label, | 1557 sync_ui_util::WITH_HTML, &status_label, |
1557 &link_label) == sync_ui_util::SYNC_ERROR; | 1558 &link_label, &action_type) == |
| 1559 sync_ui_util::SYNC_ERROR; |
1558 sync_status->SetString("statusText", status_label); | 1560 sync_status->SetString("statusText", status_label); |
1559 sync_status->SetString("actionLinkText", link_label); | 1561 sync_status->SetString("actionLinkText", link_label); |
1560 sync_status->SetBoolean("hasError", status_has_error); | 1562 sync_status->SetBoolean("hasError", status_has_error); |
1561 | 1563 |
1562 sync_status->SetBoolean("managed", service && service->IsManaged()); | 1564 sync_status->SetBoolean("managed", service && service->IsManaged()); |
1563 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); | 1565 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); |
1564 sync_status->SetString("accountInfo", | 1566 sync_status->SetString("accountInfo", |
1565 l10n_util::GetStringFUTF16( | 1567 l10n_util::GetStringFUTF16( |
1566 IDS_SYNC_ACCOUNT_INFO, | 1568 IDS_SYNC_ACCOUNT_INFO, |
1567 signin_ui_util::GetAuthenticatedUsername(signin))); | 1569 signin_ui_util::GetAuthenticatedUsername(signin))); |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 | 2236 |
2235 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2237 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2236 #if defined(OS_CHROMEOS) | 2238 #if defined(OS_CHROMEOS) |
2237 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2239 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2238 #else | 2240 #else |
2239 return true; | 2241 return true; |
2240 #endif | 2242 #endif |
2241 } | 2243 } |
2242 | 2244 |
2243 } // namespace options | 2245 } // namespace options |
OLD | NEW |