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

Side by Side Diff: remoting/host/oauth_client.cc

Issue 9950108: Fixing double deletetion of remoting::URLRequestContextGetter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/oauth_client.h ('k') | 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 "remoting/host/oauth_client.h" 5 #include "remoting/host/oauth_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/host/chromoting_host_context.h" 8 #include "remoting/host/chromoting_host_context.h"
9 #include "remoting/host/url_request_context.h" 9 #include "remoting/host/url_request_context.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 OAuthClient::OAuthClient() 13 OAuthClient::OAuthClient()
14 : network_thread_("OAuthNetworkThread"), 14 : network_thread_("OAuthNetworkThread"),
15 file_thread_("OAuthFileThread"), 15 file_thread_("OAuthFileThread"),
16 delegate_(NULL) { 16 delegate_(NULL) {
17 network_thread_.StartWithOptions( 17 network_thread_.StartWithOptions(
18 base::Thread::Options(MessageLoop::TYPE_IO, 0)); 18 base::Thread::Options(MessageLoop::TYPE_IO, 0));
19 file_thread_.StartWithOptions( 19 file_thread_.StartWithOptions(
20 base::Thread::Options(MessageLoop::TYPE_IO, 0)); 20 base::Thread::Options(MessageLoop::TYPE_IO, 0));
21 url_request_context_getter_.reset(new URLRequestContextGetter( 21 url_request_context_getter_ = new URLRequestContextGetter(
22 network_thread_.message_loop(), file_thread_.message_loop())); 22 network_thread_.message_loop(), file_thread_.message_loop());
23 gaia_oauth_client_.reset( 23 gaia_oauth_client_.reset(
24 new GaiaOAuthClient(kGaiaOAuth2Url, url_request_context_getter_.get())); 24 new GaiaOAuthClient(kGaiaOAuth2Url, url_request_context_getter_.get()));
25 } 25 }
26 26
27 OAuthClient::~OAuthClient() { 27 OAuthClient::~OAuthClient() {
28 } 28 }
29 29
30 void OAuthClient::Start(const std::string& refresh_token, 30 void OAuthClient::Start(const std::string& refresh_token,
31 OAuthClient::Delegate* delegate, 31 OAuthClient::Delegate* delegate,
32 base::MessageLoopProxy* message_loop) { 32 base::MessageLoopProxy* message_loop) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #else 79 #else
80 OAuthClientInfo client_info = { 80 OAuthClientInfo client_info = {
81 "440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.apps.googleusercontent.com", 81 "440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.apps.googleusercontent.com",
82 "W2ieEsG-R1gIA4MMurGrgMc_" 82 "W2ieEsG-R1gIA4MMurGrgMc_"
83 }; 83 };
84 #endif 84 #endif
85 gaia_oauth_client_->RefreshToken(client_info, refresh_token_, -1, this); 85 gaia_oauth_client_->RefreshToken(client_info, refresh_token_, -1, this);
86 } 86 }
87 87
88 } // namespace remoting 88 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/oauth_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698