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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 235863025: Remove desktop auto-login since we don't plan on shipping it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GYP. Created 6 years, 8 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
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 <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 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 sync_ui_util::SYNC_ERROR; 1323 sync_ui_util::SYNC_ERROR;
1324 sync_status->SetString("statusText", status_label); 1324 sync_status->SetString("statusText", status_label);
1325 sync_status->SetString("actionLinkText", link_label); 1325 sync_status->SetString("actionLinkText", link_label);
1326 sync_status->SetBoolean("hasError", status_has_error); 1326 sync_status->SetBoolean("hasError", status_has_error);
1327 1327
1328 sync_status->SetBoolean("managed", service && service->IsManaged()); 1328 sync_status->SetBoolean("managed", service && service->IsManaged());
1329 sync_status->SetBoolean("signedIn", 1329 sync_status->SetBoolean("signedIn",
1330 !signin->GetAuthenticatedUsername().empty()); 1330 !signin->GetAuthenticatedUsername().empty());
1331 sync_status->SetBoolean("hasUnrecoverableError", 1331 sync_status->SetBoolean("hasUnrecoverableError",
1332 service && service->HasUnrecoverableError()); 1332 service && service->HasUnrecoverableError());
1333 sync_status->SetBoolean(
1334 "autoLoginVisible",
1335 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1336 service && service->IsSyncEnabledAndLoggedIn() &&
1337 service->IsOAuthRefreshTokenAvailable());
1338 1333
1339 return sync_status.Pass(); 1334 return sync_status.Pass();
1340 } 1335 }
1341 1336
1342 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1337 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1343 const base::ListValue* args) { 1338 const base::ListValue* args) {
1344 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1339 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1345 select_folder_dialog_ = ui::SelectFileDialog::Create( 1340 select_folder_dialog_ = ui::SelectFileDialog::Create(
1346 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1341 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1347 ui::SelectFileDialog::FileTypeInfo info; 1342 ui::SelectFileDialog::FileTypeInfo info;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 extension_name = base::StringValue( 1728 extension_name = base::StringValue(
1734 extension ? extension->name() : std::string()); 1729 extension ? extension->name() : std::string());
1735 web_ui()->CallJavascriptFunction( 1730 web_ui()->CallJavascriptFunction(
1736 "BrowserOptions.toggleStartupPagesControlled", 1731 "BrowserOptions.toggleStartupPagesControlled",
1737 extension_id, 1732 extension_id,
1738 extension_name); 1733 extension_name);
1739 } 1734 }
1740 #endif // defined(OS_WIN) 1735 #endif // defined(OS_WIN)
1741 1736
1742 } // namespace options 1737 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698