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

Side by Side Diff: chrome/browser/drive/drive_api_service.cc

Issue 18742002: Remove direct reference to GetBlockingPool() in c/b/google_apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix + rebase. Created 7 years, 5 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
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 "chrome/browser/drive/drive_api_service.h" 5 #include "chrome/browser/drive/drive_api_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 void DriveAPIService::Initialize(Profile* profile) { 281 void DriveAPIService::Initialize(Profile* profile) {
282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
283 profile_ = profile; 283 profile_ = profile;
284 284
285 std::vector<std::string> scopes; 285 std::vector<std::string> scopes;
286 scopes.push_back(kDriveScope); 286 scopes.push_back(kDriveScope);
287 scopes.push_back(kDriveAppsReadonlyScope); 287 scopes.push_back(kDriveAppsReadonlyScope);
288 sender_.reset(new RequestSender(profile, 288 sender_.reset(new RequestSender(profile,
289 url_request_context_getter_, 289 url_request_context_getter_,
290 blocking_task_runner_.get(),
290 scopes, 291 scopes,
291 custom_user_agent_)); 292 custom_user_agent_));
292 sender_->Initialize(); 293 sender_->Initialize();
293 294
294 sender_->auth_service()->AddObserver(this); 295 sender_->auth_service()->AddObserver(this);
295 } 296 }
296 297
297 void DriveAPIService::AddObserver(DriveServiceObserver* observer) { 298 void DriveAPIService::AddObserver(DriveServiceObserver* observer) {
298 observers_.AddObserver(observer); 299 observers_.AddObserver(observer);
299 } 300 }
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 if (CanSendRequest()) { 755 if (CanSendRequest()) {
755 FOR_EACH_OBSERVER( 756 FOR_EACH_OBSERVER(
756 DriveServiceObserver, observers_, OnReadyToSendRequests()); 757 DriveServiceObserver, observers_, OnReadyToSendRequests());
757 } else if (!HasRefreshToken()) { 758 } else if (!HasRefreshToken()) {
758 FOR_EACH_OBSERVER( 759 FOR_EACH_OBSERVER(
759 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); 760 DriveServiceObserver, observers_, OnRefreshTokenInvalid());
760 } 761 }
761 } 762 }
762 763
763 } // namespace drive 764 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698