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 "apps/app_window.h" | 10 #include "apps/app_window.h" |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 base::string16 status_label; | 1382 base::string16 status_label; |
1383 base::string16 link_label; | 1383 base::string16 link_label; |
1384 bool status_has_error = sync_ui_util::GetStatusLabels( | 1384 bool status_has_error = sync_ui_util::GetStatusLabels( |
1385 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == | 1385 service, *signin, sync_ui_util::WITH_HTML, &status_label, &link_label) == |
1386 sync_ui_util::SYNC_ERROR; | 1386 sync_ui_util::SYNC_ERROR; |
1387 sync_status->SetString("statusText", status_label); | 1387 sync_status->SetString("statusText", status_label); |
1388 sync_status->SetString("actionLinkText", link_label); | 1388 sync_status->SetString("actionLinkText", link_label); |
1389 sync_status->SetBoolean("hasError", status_has_error); | 1389 sync_status->SetBoolean("hasError", status_has_error); |
1390 | 1390 |
1391 sync_status->SetBoolean("managed", service && service->IsManaged()); | 1391 sync_status->SetBoolean("managed", service && service->IsManaged()); |
1392 sync_status->SetBoolean("signedIn", | 1392 sync_status->SetBoolean("signedIn", signin->IsAuthenticated()); |
1393 !signin->GetAuthenticatedUsername().empty()); | |
1394 sync_status->SetBoolean("hasUnrecoverableError", | 1393 sync_status->SetBoolean("hasUnrecoverableError", |
1395 service && service->HasUnrecoverableError()); | 1394 service && service->HasUnrecoverableError()); |
1396 | 1395 |
1397 return sync_status.Pass(); | 1396 return sync_status.Pass(); |
1398 } | 1397 } |
1399 | 1398 |
1400 void BrowserOptionsHandler::HandleSelectDownloadLocation( | 1399 void BrowserOptionsHandler::HandleSelectDownloadLocation( |
1401 const base::ListValue* args) { | 1400 const base::ListValue* args) { |
1402 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); | 1401 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); |
1403 select_folder_dialog_ = ui::SelectFileDialog::Create( | 1402 select_folder_dialog_ = ui::SelectFileDialog::Create( |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 extension = extensions::GetExtensionOverridingProxy( | 1862 extension = extensions::GetExtensionOverridingProxy( |
1864 Profile::FromWebUI(web_ui())); | 1863 Profile::FromWebUI(web_ui())); |
1865 AppendExtensionData("proxy", extension, &extension_controlled); | 1864 AppendExtensionData("proxy", extension, &extension_controlled); |
1866 | 1865 |
1867 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", | 1866 web_ui()->CallJavascriptFunction("BrowserOptions.toggleExtensionIndicators", |
1868 extension_controlled); | 1867 extension_controlled); |
1869 #endif // defined(OS_WIN) | 1868 #endif // defined(OS_WIN) |
1870 } | 1869 } |
1871 | 1870 |
1872 } // namespace options | 1871 } // namespace options |
OLD | NEW |