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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/sync/glue/sync_backend_host.h" 7 #include "chrome/browser/sync/glue/sync_backend_host.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 namespace { 303 namespace {
304 304
305 // Parses the given command line for notifier options. 305 // Parses the given command line for notifier options.
306 notifier::NotifierOptions ParseNotifierOptions( 306 notifier::NotifierOptions ParseNotifierOptions(
307 const CommandLine& command_line, 307 const CommandLine& command_line,
308 const scoped_refptr<net::URLRequestContextGetter>& 308 const scoped_refptr<net::URLRequestContextGetter>&
309 request_context_getter) { 309 request_context_getter) {
310 notifier::NotifierOptions notifier_options; 310 notifier::NotifierOptions notifier_options;
311 notifier_options.request_context_getter = request_context_getter; 311 notifier_options.request_context_getter = request_context_getter;
312 notifier_options.auth_mechanism ="X-OAUTH2";
312 313
313 if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) { 314 if (command_line.HasSwitch(switches::kSyncNotificationHostPort)) {
314 notifier_options.xmpp_host_port = 315 notifier_options.xmpp_host_port =
315 net::HostPortPair::FromString( 316 net::HostPortPair::FromString(
316 command_line.GetSwitchValueASCII( 317 command_line.GetSwitchValueASCII(
317 switches::kSyncNotificationHostPort)); 318 switches::kSyncNotificationHostPort));
318 DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString() 319 DVLOG(1) << "Using " << notifier_options.xmpp_host_port.ToString()
319 << " for test sync notification server."; 320 << " for test sync notification server.";
320 } 321 }
321 322
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 DVLOG(1) << "Connection status changed: " 1678 DVLOG(1) << "Connection status changed: "
1678 << syncer::ConnectionStatusToString(status); 1679 << syncer::ConnectionStatusToString(status);
1679 frontend_->OnConnectionStatusChange(status); 1680 frontend_->OnConnectionStatusChange(status);
1680 } 1681 }
1681 1682
1682 #undef SDVLOG 1683 #undef SDVLOG
1683 1684
1684 #undef SLOG 1685 #undef SLOG
1685 1686
1686 } // namespace browser_sync 1687 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698