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

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

Issue 15421011: Use OAuth2 token for sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues based on feedback Created 7 years, 6 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 "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 1224
1225 sync_status->SetBoolean("managed", service && service->IsManaged()); 1225 sync_status->SetBoolean("managed", service && service->IsManaged());
1226 sync_status->SetBoolean("signedIn", 1226 sync_status->SetBoolean("signedIn",
1227 !signin->GetAuthenticatedUsername().empty()); 1227 !signin->GetAuthenticatedUsername().empty());
1228 sync_status->SetBoolean("hasUnrecoverableError", 1228 sync_status->SetBoolean("hasUnrecoverableError",
1229 service && service->HasUnrecoverableError()); 1229 service && service->HasUnrecoverableError());
1230 sync_status->SetBoolean( 1230 sync_status->SetBoolean(
1231 "autoLoginVisible", 1231 "autoLoginVisible",
1232 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1232 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1233 service && service->IsSyncEnabledAndLoggedIn() && 1233 service && service->IsSyncEnabledAndLoggedIn() &&
1234 service->IsSyncTokenAvailable()); 1234 service->IsOAuthRefreshTokenAvailable());
1235 1235
1236 return sync_status.Pass(); 1236 return sync_status.Pass();
1237 } 1237 }
1238 1238
1239 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1239 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1240 const ListValue* args) { 1240 const ListValue* args) {
1241 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1241 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1242 select_folder_dialog_ = ui::SelectFileDialog::Create( 1242 select_folder_dialog_ = ui::SelectFileDialog::Create(
1243 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1243 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1244 ui::SelectFileDialog::FileTypeInfo info; 1244 ui::SelectFileDialog::FileTypeInfo info;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1586 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() ||
1587 is_extension_controlled); 1587 is_extension_controlled);
1588 base::FundamentalValue extension_controlled(is_extension_controlled); 1588 base::FundamentalValue extension_controlled(is_extension_controlled);
1589 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1589 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1590 disabled, extension_controlled); 1590 disabled, extension_controlled);
1591 1591
1592 #endif // !defined(OS_CHROMEOS) 1592 #endif // !defined(OS_CHROMEOS)
1593 } 1593 }
1594 1594
1595 } // namespace options 1595 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698