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

Side by Side Diff: sync/tools/sync_client.cc

Issue 54353005: Fix sync_client to work with oauth2 tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <cstddef> 5 #include <cstddef>
6 #include <cstdio> 6 #include <cstdio>
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 void LogUnrecoverableErrorContext() { 188 void LogUnrecoverableErrorContext() {
189 base::debug::StackTrace().Print(); 189 base::debug::StackTrace().Print();
190 } 190 }
191 191
192 notifier::NotifierOptions ParseNotifierOptions( 192 notifier::NotifierOptions ParseNotifierOptions(
193 const CommandLine& command_line, 193 const CommandLine& command_line,
194 const scoped_refptr<net::URLRequestContextGetter>& 194 const scoped_refptr<net::URLRequestContextGetter>&
195 request_context_getter) { 195 request_context_getter) {
196 notifier::NotifierOptions notifier_options; 196 notifier::NotifierOptions notifier_options;
197 notifier_options.request_context_getter = request_context_getter; 197 notifier_options.request_context_getter = request_context_getter;
198 notifier_options.auth_mechanism = "X-OAUTH2";
198 199
199 if (command_line.HasSwitch(kXmppHostPortSwitch)) { 200 if (command_line.HasSwitch(kXmppHostPortSwitch)) {
200 notifier_options.xmpp_host_port = 201 notifier_options.xmpp_host_port =
201 net::HostPortPair::FromString( 202 net::HostPortPair::FromString(
202 command_line.GetSwitchValueASCII(kXmppHostPortSwitch)); 203 command_line.GetSwitchValueASCII(kXmppHostPortSwitch));
203 LOG(INFO) << "Using " << notifier_options.xmpp_host_port.ToString() 204 LOG(INFO) << "Using " << notifier_options.xmpp_host_port.ToString()
204 << " for test sync notification server."; 205 << " for test sync notification server.";
205 } 206 }
206 207
207 notifier_options.try_ssltcp_first = 208 notifier_options.try_ssltcp_first =
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 io_thread.Stop(); 387 io_thread.Stop();
387 return 0; 388 return 0;
388 } 389 }
389 390
390 } // namespace 391 } // namespace
391 } // namespace syncer 392 } // namespace syncer
392 393
393 int main(int argc, char* argv[]) { 394 int main(int argc, char* argv[]) {
394 return syncer::SyncClientMain(argc, argv); 395 return syncer::SyncClientMain(argc, argv);
395 } 396 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698