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

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: Remove token prefetch. Move UMA counters. Fix some tests. Etc. 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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 1255
1256 sync_status->SetBoolean("managed", service && service->IsManaged()); 1256 sync_status->SetBoolean("managed", service && service->IsManaged());
1257 sync_status->SetBoolean("signedIn", 1257 sync_status->SetBoolean("signedIn",
1258 !signin->GetAuthenticatedUsername().empty()); 1258 !signin->GetAuthenticatedUsername().empty());
1259 sync_status->SetBoolean("hasUnrecoverableError", 1259 sync_status->SetBoolean("hasUnrecoverableError",
1260 service && service->HasUnrecoverableError()); 1260 service && service->HasUnrecoverableError());
1261 sync_status->SetBoolean( 1261 sync_status->SetBoolean(
1262 "autoLoginVisible", 1262 "autoLoginVisible",
1263 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1263 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1264 service && service->IsSyncEnabledAndLoggedIn() && 1264 service && service->IsSyncEnabledAndLoggedIn() &&
1265 service->IsSyncTokenAvailable()); 1265 service->IsOAuthRefreshTokenAvailable());
1266 1266
1267 return sync_status.Pass(); 1267 return sync_status.Pass();
1268 } 1268 }
1269 1269
1270 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1270 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1271 const ListValue* args) { 1271 const ListValue* args) {
1272 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1272 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1273 select_folder_dialog_ = ui::SelectFileDialog::Create( 1273 select_folder_dialog_ = ui::SelectFileDialog::Create(
1274 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1274 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1275 ui::SelectFileDialog::FileTypeInfo info; 1275 ui::SelectFileDialog::FileTypeInfo info;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1618 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() ||
1619 is_extension_controlled); 1619 is_extension_controlled);
1620 base::FundamentalValue extension_controlled(is_extension_controlled); 1620 base::FundamentalValue extension_controlled(is_extension_controlled);
1621 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1621 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1622 disabled, extension_controlled); 1622 disabled, extension_controlled);
1623 1623
1624 #endif // !defined(OS_CHROMEOS) 1624 #endif // !defined(OS_CHROMEOS)
1625 } 1625 }
1626 1626
1627 } // namespace options 1627 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698