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

Side by Side Diff: remoting/host/setup/me2me_native_messaging_host_main.cc

Issue 1099553003: Added unit tests for getCredentialsFromAuthCode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/host/setup/me2me_native_messaging_host_main.h" 5 #include "remoting/host/setup/me2me_native_messaging_host_main.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 write_file = base::File(STDOUT_FILENO); 190 write_file = base::File(STDOUT_FILENO);
191 #else 191 #else
192 #error Not implemented. 192 #error Not implemented.
193 #endif 193 #endif
194 194
195 // OAuth client (for credential requests). IO thread is used for blocking 195 // OAuth client (for credential requests). IO thread is used for blocking
196 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter( 196 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter(
197 new URLRequestContextGetter(io_thread.task_runner(), 197 new URLRequestContextGetter(io_thread.task_runner(),
198 file_thread.task_runner())); 198 file_thread.task_runner()));
199 scoped_ptr<OAuthClient> oauth_client( 199 scoped_ptr<OAuthClient> oauth_client(
200 new OAuthClient(url_request_context_getter)); 200 new GaiaOAuthClient(url_request_context_getter));
201 201
202 net::URLFetcher::SetIgnoreCertificateRequests(true); 202 net::URLFetcher::SetIgnoreCertificateRequests(true);
203 203
204 // Create the pairing registry. 204 // Create the pairing registry.
205 scoped_refptr<PairingRegistry> pairing_registry; 205 scoped_refptr<PairingRegistry> pairing_registry;
206 206
207 #if defined(OS_WIN) 207 #if defined(OS_WIN)
208 base::win::RegKey root; 208 base::win::RegKey root;
209 LONG result = root.Open(HKEY_LOCAL_MACHINE, kPairingRegistryKeyName, 209 LONG result = root.Open(HKEY_LOCAL_MACHINE, kPairingRegistryKeyName,
210 KEY_READ); 210 KEY_READ);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // This object instance is required by Chrome code (such as MessageLoop). 274 // This object instance is required by Chrome code (such as MessageLoop).
275 base::AtExitManager exit_manager; 275 base::AtExitManager exit_manager;
276 276
277 base::CommandLine::Init(argc, argv); 277 base::CommandLine::Init(argc, argv);
278 remoting::InitHostLogging(); 278 remoting::InitHostLogging();
279 279
280 return StartMe2MeNativeMessagingHost(); 280 return StartMe2MeNativeMessagingHost();
281 } 281 }
282 282
283 } // namespace remoting 283 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/setup/me2me_native_messaging_host_unittest.cc » ('j') | remoting/host/setup/mock_oauth_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698