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

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

Issue 2661153003: Moving oauth code from host to base to allow code sharing between host and client. (Closed)
Patch Set: Merge branch 'master' into auth_token Created 3 years, 10 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 "remoting/host/setup/host_starter.h" 5 #include "remoting/host/setup/host_starter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
11 #include "base/guid.h" 11 #include "base/guid.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "google_apis/google_api_keys.h" 16 #include "google_apis/google_api_keys.h"
17 #include "remoting/base/oauth_helper.h"
17 #include "remoting/host/pin_hash.h" 18 #include "remoting/host/pin_hash.h"
18 #include "remoting/host/setup/oauth_helper.h"
19 19
20 namespace { 20 namespace {
21 const int kMaxGetTokensRetries = 3; 21 const int kMaxGetTokensRetries = 3;
22 } // namespace 22 } // namespace
23 23
24 namespace remoting { 24 namespace remoting {
25 25
26 HostStarter::HostStarter( 26 HostStarter::HostStarter(
27 std::unique_ptr<gaia::GaiaOAuthClient> oauth_client, 27 std::unique_ptr<gaia::GaiaOAuthClient> oauth_client,
28 std::unique_ptr<remoting::ServiceClient> service_client, 28 std::unique_ptr<remoting::ServiceClient> service_client,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void HostStarter::OnHostUnregistered() { 217 void HostStarter::OnHostUnregistered() {
218 if (!main_task_runner_->BelongsToCurrentThread()) { 218 if (!main_task_runner_->BelongsToCurrentThread()) {
219 main_task_runner_->PostTask(FROM_HERE, base::Bind( 219 main_task_runner_->PostTask(FROM_HERE, base::Bind(
220 &HostStarter::OnHostUnregistered, weak_ptr_)); 220 &HostStarter::OnHostUnregistered, weak_ptr_));
221 return; 221 return;
222 } 222 }
223 base::ResetAndReturn(&on_done_).Run(START_ERROR); 223 base::ResetAndReturn(&on_done_).Run(START_ERROR);
224 } 224 }
225 225
226 } // namespace remoting 226 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/gaia_oauth_client.cc ('k') | remoting/host/setup/me2me_native_messaging_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698