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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 Profile::FromWebUI(web_ui())); | 1068 Profile::FromWebUI(web_ui())); |
1069 | 1069 |
1070 bool status_has_error = sync_ui_util::GetStatusLabels( | 1070 bool status_has_error = sync_ui_util::GetStatusLabels( |
1071 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == | 1071 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == |
1072 sync_ui_util::SYNC_ERROR; | 1072 sync_ui_util::SYNC_ERROR; |
1073 sync_status->SetString("statusText", status_label); | 1073 sync_status->SetString("statusText", status_label); |
1074 sync_status->SetString("actionLinkText", link_label); | 1074 sync_status->SetString("actionLinkText", link_label); |
1075 sync_status->SetBoolean("hasError", status_has_error); | 1075 sync_status->SetBoolean("hasError", status_has_error); |
1076 | 1076 |
1077 sync_status->SetBoolean("managed", service->IsManaged()); | 1077 sync_status->SetBoolean("managed", service->IsManaged()); |
| 1078 sync_status->SetBoolean("signedIn", |
| 1079 !signin->GetAuthenticatedUsername().empty()); |
1078 sync_status->SetBoolean("hasUnrecoverableError", | 1080 sync_status->SetBoolean("hasUnrecoverableError", |
1079 service->HasUnrecoverableError()); | 1081 service->HasUnrecoverableError()); |
1080 sync_status->SetBoolean( | 1082 sync_status->SetBoolean( |
1081 "autoLoginVisible", | 1083 "autoLoginVisible", |
1082 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && | 1084 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && |
1083 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable()); | 1085 service->IsSyncEnabledAndLoggedIn() && service->IsSyncTokenAvailable()); |
1084 | 1086 |
1085 return sync_status.Pass(); | 1087 return sync_status.Pass(); |
1086 } | 1088 } |
1087 | 1089 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 1411 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
1410 } | 1412 } |
1411 StringValue label(label_str); | 1413 StringValue label(label_str); |
1412 | 1414 |
1413 web_ui()->CallJavascriptFunction( | 1415 web_ui()->CallJavascriptFunction( |
1414 "BrowserOptions.setupProxySettingsSection", disabled, label); | 1416 "BrowserOptions.setupProxySettingsSection", disabled, label); |
1415 #endif // !defined(OS_CHROMEOS) | 1417 #endif // !defined(OS_CHROMEOS) |
1416 } | 1418 } |
1417 | 1419 |
1418 } // namespace options | 1420 } // namespace options |
OLD | NEW |