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

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: Rebase 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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 1404
1405 sync_status->SetBoolean("managed", service && service->IsManaged()); 1405 sync_status->SetBoolean("managed", service && service->IsManaged());
1406 sync_status->SetBoolean("signedIn", 1406 sync_status->SetBoolean("signedIn",
1407 !signin->GetAuthenticatedUsername().empty()); 1407 !signin->GetAuthenticatedUsername().empty());
1408 sync_status->SetBoolean("hasUnrecoverableError", 1408 sync_status->SetBoolean("hasUnrecoverableError",
1409 service && service->HasUnrecoverableError()); 1409 service && service->HasUnrecoverableError());
1410 sync_status->SetBoolean( 1410 sync_status->SetBoolean(
1411 "autoLoginVisible", 1411 "autoLoginVisible",
1412 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) && 1412 CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAutologin) &&
1413 service && service->IsSyncEnabledAndLoggedIn() && 1413 service && service->IsSyncEnabledAndLoggedIn() &&
1414 service->IsSyncTokenAvailable()); 1414 service->IsOAuthRefreshTokenAvailable());
1415 1415
1416 return sync_status.Pass(); 1416 return sync_status.Pass();
1417 } 1417 }
1418 1418
1419 void BrowserOptionsHandler::HandleSelectDownloadLocation( 1419 void BrowserOptionsHandler::HandleSelectDownloadLocation(
1420 const ListValue* args) { 1420 const ListValue* args) {
1421 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs(); 1421 PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1422 select_folder_dialog_ = ui::SelectFileDialog::Create( 1422 select_folder_dialog_ = ui::SelectFileDialog::Create(
1423 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents())); 1423 this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
1424 ui::SelectFileDialog::FileTypeInfo info; 1424 ui::SelectFileDialog::FileTypeInfo info;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() || 1741 base::FundamentalValue disabled(profile_pref_registrar_.IsManaged() ||
1742 is_extension_controlled); 1742 is_extension_controlled);
1743 base::FundamentalValue extension_controlled(is_extension_controlled); 1743 base::FundamentalValue extension_controlled(is_extension_controlled);
1744 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1744 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1745 disabled, extension_controlled); 1745 disabled, extension_controlled);
1746 1746
1747 #endif // !defined(OS_CHROMEOS) 1747 #endif // !defined(OS_CHROMEOS)
1748 } 1748 }
1749 1749
1750 } // namespace options 1750 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | chrome/browser/ui/webui/sync_setup_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698