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

Side by Side Diff: chrome/browser/ui/app_list/search/people/people_provider.cc

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: followupfix-after-rebase Created 5 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
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 "chrome/browser/ui/app_list/search/people/people_provider.h" 5 #include "chrome/browser/ui/app_list/search/people/people_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void PeopleProvider::Stop() { 97 void PeopleProvider::Stop() {
98 if (people_search_) 98 if (people_search_)
99 people_search_->Stop(); 99 people_search_->Stop();
100 } 100 }
101 101
102 void PeopleProvider::OnGetTokenSuccess( 102 void PeopleProvider::OnGetTokenSuccess(
103 const OAuth2TokenService::Request* request, 103 const OAuth2TokenService::Request* request,
104 const std::string& access_token, 104 const std::string& access_token,
105 const base::Time& expiration_time) { 105 const base::Time& expiration_time) {
106 DCHECK_EQ(access_token_request_, request); 106 DCHECK_EQ(access_token_request_.get(), request);
107 access_token_request_.reset(); 107 access_token_request_.reset();
108 access_token_ = access_token; 108 access_token_ = access_token;
109 StartQuery(); 109 StartQuery();
110 } 110 }
111 111
112 void PeopleProvider::OnGetTokenFailure( 112 void PeopleProvider::OnGetTokenFailure(
113 const OAuth2TokenService::Request* request, 113 const OAuth2TokenService::Request* request,
114 const GoogleServiceAuthError& error) { 114 const GoogleServiceAuthError& error) {
115 DCHECK_EQ(access_token_request_, request); 115 DCHECK_EQ(access_token_request_.get(), request);
116 access_token_request_.reset(); 116 access_token_request_.reset();
117 } 117 }
118 118
119 void PeopleProvider::RequestAccessToken() { 119 void PeopleProvider::RequestAccessToken() {
120 // Only one active request at a time. 120 // Only one active request at a time.
121 if (access_token_request_ != NULL) 121 if (access_token_request_ != NULL)
122 return; 122 return;
123 123
124 SigninManagerBase* signin_manager = 124 SigninManagerBase* signin_manager =
125 SigninManagerFactory::GetInstance()->GetForProfile(profile_); 125 SigninManagerFactory::GetInstance()->GetForProfile(profile_);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 void PeopleProvider::SetupForTest( 202 void PeopleProvider::SetupForTest(
203 const base::Closure& people_search_fetched_callback, 203 const base::Closure& people_search_fetched_callback,
204 const GURL& people_search_url) { 204 const GURL& people_search_url) {
205 people_search_fetched_callback_ = people_search_fetched_callback; 205 people_search_fetched_callback_ = people_search_fetched_callback;
206 people_search_url_ = people_search_url; 206 people_search_url_ = people_search_url;
207 skip_request_token_for_test_ = true; 207 skip_request_token_for_test_ = true;
208 } 208 }
209 209
210 } // namespace app_list 210 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698