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

Side by Side Diff: chrome/browser/chromeos/policy/wildcard_login_checker.cc

Issue 549313004: Remove implicit conversions from scoped_refptr to T* in c/b/chromeos/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/policy/wildcard_login_checker.h" 5 #include "chrome/browser/chromeos/policy/wildcard_login_checker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 26 matching lines...) Expand all
37 void WildcardLoginChecker::Start( 37 void WildcardLoginChecker::Start(
38 scoped_refptr<net::URLRequestContextGetter> signin_context, 38 scoped_refptr<net::URLRequestContextGetter> signin_context,
39 const StatusCallback& callback) { 39 const StatusCallback& callback) {
40 CHECK(!token_fetcher_); 40 CHECK(!token_fetcher_);
41 CHECK(!user_info_fetcher_); 41 CHECK(!user_info_fetcher_);
42 42
43 start_timestamp_ = base::Time::Now(); 43 start_timestamp_ = base::Time::Now();
44 44
45 callback_ = callback; 45 callback_ = callback;
46 token_fetcher_.reset(new PolicyOAuth2TokenFetcher( 46 token_fetcher_.reset(new PolicyOAuth2TokenFetcher(
47 signin_context, 47 signin_context.get(),
48 g_browser_process->system_request_context(), 48 g_browser_process->system_request_context(),
49 base::Bind(&WildcardLoginChecker::OnPolicyTokenFetched, 49 base::Bind(&WildcardLoginChecker::OnPolicyTokenFetched,
50 base::Unretained(this)))); 50 base::Unretained(this))));
51 token_fetcher_->Start(); 51 token_fetcher_->Start();
52 } 52 }
53 53
54 void WildcardLoginChecker::StartWithAccessToken( 54 void WildcardLoginChecker::StartWithAccessToken(
55 const std::string& access_token, 55 const std::string& access_token,
56 const StatusCallback& callback) { 56 const StatusCallback& callback) {
57 CHECK(!token_fetcher_); 57 CHECK(!token_fetcher_);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 new UserInfoFetcher(this, g_browser_process->system_request_context())); 106 new UserInfoFetcher(this, g_browser_process->system_request_context()));
107 user_info_fetcher_->Start(access_token); 107 user_info_fetcher_->Start(access_token);
108 } 108 }
109 109
110 void WildcardLoginChecker::OnCheckCompleted(Result result) { 110 void WildcardLoginChecker::OnCheckCompleted(Result result) {
111 if (!callback_.is_null()) 111 if (!callback_.is_null())
112 callback_.Run(result); 112 callback_.Run(result);
113 } 113 }
114 114
115 } // namespace policy 115 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698