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

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

Issue 11804004: Add base_url to DriveApiUrlGenerator. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Introduce kBaseUrlForProduction in DriveApiUrlGenerator Created 7 years, 11 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 "chrome/browser/chromeos/drive/drive_api_service.h" 5 #include "chrome/browser/chromeos/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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // TODO(satorux): Convert AboutResource to AccountMetadataFeed. 115 // TODO(satorux): Convert AboutResource to AccountMetadataFeed.
116 // For now just returning an error. crbug.com/165621 116 // For now just returning an error. crbug.com/165621
117 callback.Run(google_apis::GDATA_PARSE_ERROR, 117 callback.Run(google_apis::GDATA_PARSE_ERROR,
118 scoped_ptr<google_apis::AccountMetadataFeed>()); 118 scoped_ptr<google_apis::AccountMetadataFeed>());
119 } 119 }
120 120
121 } // namespace 121 } // namespace
122 122
123 DriveAPIService::DriveAPIService( 123 DriveAPIService::DriveAPIService(
124 net::URLRequestContextGetter* url_request_context_getter, 124 net::URLRequestContextGetter* url_request_context_getter,
125 const GURL& base_url,
125 const std::string& custom_user_agent) 126 const std::string& custom_user_agent)
126 : url_request_context_getter_(url_request_context_getter), 127 : url_request_context_getter_(url_request_context_getter),
127 profile_(NULL), 128 profile_(NULL),
128 runner_(NULL), 129 runner_(NULL),
130 url_generator_(base_url),
129 custom_user_agent_(custom_user_agent) { 131 custom_user_agent_(custom_user_agent) {
130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
131 } 133 }
132 134
133 DriveAPIService::~DriveAPIService() { 135 DriveAPIService::~DriveAPIService() {
134 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
135 if (runner_.get()) { 137 if (runner_.get()) {
136 runner_->operation_registry()->RemoveObserver(this); 138 runner_->operation_registry()->RemoveObserver(this);
137 runner_->auth_service()->RemoveObserver(this); 139 runner_->auth_service()->RemoveObserver(this);
138 } 140 }
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 439
438 void DriveAPIService::OnAuthenticationFailed( 440 void DriveAPIService::OnAuthenticationFailed(
439 google_apis::GDataErrorCode error) { 441 google_apis::GDataErrorCode error) {
440 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 442 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
441 FOR_EACH_OBSERVER( 443 FOR_EACH_OBSERVER(
442 google_apis::DriveServiceObserver, observers_, 444 google_apis::DriveServiceObserver, observers_,
443 OnAuthenticationFailed(error)); 445 OnAuthenticationFailed(error));
444 } 446 }
445 447
446 } // namespace drive 448 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_api_service.h ('k') | chrome/browser/chromeos/drive/drive_system_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698