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

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: Add commandline switch to toggle between OAuth2 and ClientLogin token 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 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 1400
1401 sync_status->SetBoolean("managed", service && service->IsManaged()); 1401 sync_status->SetBoolean("managed", service && service->IsManaged());
1402 sync_status->SetBoolean("signedIn", 1402 sync_status->SetBoolean("signedIn",
1403 !signin->GetAuthenticatedUsername().empty()); 1403 !signin->GetAuthenticatedUsername().empty());
1404 sync_status->SetBoolean("hasUnrecoverableError", 1404 sync_status->SetBoolean("hasUnrecoverableError",
1405 service && service->HasUnrecoverableError()); 1405 service && service->HasUnrecoverableError());
1406 sync_status->SetBoolean( 1406 sync_status->SetBoolean(
1407 "autoLoginVisible", 1407 "autoLoginVisible",
1408 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1408 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1409 service && service->IsSyncEnabledAndLoggedIn() && 1409 service && service->IsSyncEnabledAndLoggedIn() &&
1410 service->IsSyncTokenAvailable()); 1410 service->IsOAuthRefreshTokenAvailable());
1411 1411
1412 return sync_status.Pass(); 1412 return sync_status.Pass();
1413 } 1413 }
1414 1414
1415 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1415 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1416 const ListValue* args) { 1416 const ListValue* args) {
1417 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1417 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1418 select_folder_dialog_ = ui::SelectFileDialog::Create( 1418 select_folder_dialog_ = ui::SelectFileDialog::Create(
1419 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1419 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1420 ui::SelectFileDialog::FileTypeInfo info; 1420 ui::SelectFileDialog::FileTypeInfo info;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1737 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() ||
1738 is_extension_controlled); 1738 is_extension_controlled);
1739 base::FundamentalValue extension_controlled(is_extension_controlled); 1739 base::FundamentalValue extension_controlled(is_extension_controlled);
1740 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1740 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1741 disabled, extension_controlled); 1741 disabled, extension_controlled);
1742 1742
1743 #endif // !defined(OS_CHROMEOS) 1743 #endif // !defined(OS_CHROMEOS)
1744 } 1744 }
1745 1745
1746 } // namespace options 1746 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698