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

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

Issue 208393015: Revert "Remove desktop auto-login since we don't plan on shipping it there. Refactor the base and … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « chrome/browser/ui/auto_login_prompter.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 sync_ui_util::SYNC_ERROR; 1356 sync_ui_util::SYNC_ERROR;
1357 sync_status->SetString("statusText", status_label); 1357 sync_status->SetString("statusText", status_label);
1358 sync_status->SetString("actionLinkText", link_label); 1358 sync_status->SetString("actionLinkText", link_label);
1359 sync_status->SetBoolean("hasError", status_has_error); 1359 sync_status->SetBoolean("hasError", status_has_error);
1360 1360
1361 sync_status->SetBoolean("managed", service && service->IsManaged()); 1361 sync_status->SetBoolean("managed", service && service->IsManaged());
1362 sync_status->SetBoolean("signedIn", 1362 sync_status->SetBoolean("signedIn",
1363 !signin->GetAuthenticatedUsername().empty()); 1363 !signin->GetAuthenticatedUsername().empty());
1364 sync_status->SetBoolean("hasUnrecoverableError", 1364 sync_status->SetBoolean("hasUnrecoverableError",
1365 service && service->HasUnrecoverableError()); 1365 service && service->HasUnrecoverableError());
1366 sync_status->SetBoolean(
1367 "autoLoginVisible",
1368 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1369 service && service->IsSyncEnabledAndLoggedIn() &&
1370 service->IsOAuthRefreshTokenAvailable());
1366 1371
1367 return sync_status.Pass(); 1372 return sync_status.Pass();
1368 } 1373 }
1369 1374
1370 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1375 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1371 const base::ListValue* args) { 1376 const base::ListValue* args) {
1372 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1377 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1373 select_folder_dialog_ = ui::SelectFileDialog::Create( 1378 select_folder_dialog_ = ui::SelectFileDialog::Create(
1374 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1379 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1375 ui::SelectFileDialog::FileTypeInfo info; 1380 ui::SelectFileDialog::FileTypeInfo info;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 void BrowserOptionsHandler::SetupEasyUnlock() { 1814 void BrowserOptionsHandler::SetupEasyUnlock() {
1810 bool has_pairing = !Profile::FromWebUI(web_ui())->GetPrefs() 1815 bool has_pairing = !Profile::FromWebUI(web_ui())->GetPrefs()
1811 ->GetDictionary(prefs::kEasyUnlockPairing)->empty(); 1816 ->GetDictionary(prefs::kEasyUnlockPairing)->empty();
1812 base::FundamentalValue has_pairing_value(has_pairing); 1817 base::FundamentalValue has_pairing_value(has_pairing);
1813 web_ui()->CallJavascriptFunction( 1818 web_ui()->CallJavascriptFunction(
1814 "BrowserOptions.updateEasyUnlock", 1819 "BrowserOptions.updateEasyUnlock",
1815 has_pairing_value); 1820 has_pairing_value);
1816 } 1821 }
1817 1822
1818 } // namespace options 1823 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/auto_login_prompter.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698