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

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

Issue 445473002: Remove ResourceIdCanonicalizer from DriveServiceInterface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « chrome/browser/drive/drive_api_service.h ('k') | chrome/browser/drive/drive_api_util.h » ('j') | 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 "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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 void DriveAPIService::RemoveObserver(DriveServiceObserver* observer) { 212 void DriveAPIService::RemoveObserver(DriveServiceObserver* observer) {
213 observers_.RemoveObserver(observer); 213 observers_.RemoveObserver(observer);
214 } 214 }
215 215
216 bool DriveAPIService::CanSendRequest() const { 216 bool DriveAPIService::CanSendRequest() const {
217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
218 218
219 return HasRefreshToken(); 219 return HasRefreshToken();
220 } 220 }
221 221
222 ResourceIdCanonicalizer DriveAPIService::GetResourceIdCanonicalizer() const {
223 return base::Bind(&drive::util::CanonicalizeResourceId);
224 }
225
226 std::string DriveAPIService::GetRootResourceId() const { 222 std::string DriveAPIService::GetRootResourceId() const {
227 return kDriveApiRootDirectoryResourceId; 223 return kDriveApiRootDirectoryResourceId;
228 } 224 }
229 225
230 CancelCallback DriveAPIService::GetAllFileList( 226 CancelCallback DriveAPIService::GetAllFileList(
231 const FileListCallback& callback) { 227 const FileListCallback& callback) {
232 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 228 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
233 DCHECK(!callback.is_null()); 229 DCHECK(!callback.is_null());
234 230
235 FilesListRequest* request = new FilesListRequest( 231 FilesListRequest* request = new FilesListRequest(
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 if (CanSendRequest()) { 746 if (CanSendRequest()) {
751 FOR_EACH_OBSERVER( 747 FOR_EACH_OBSERVER(
752 DriveServiceObserver, observers_, OnReadyToSendRequests()); 748 DriveServiceObserver, observers_, OnReadyToSendRequests());
753 } else if (!HasRefreshToken()) { 749 } else if (!HasRefreshToken()) {
754 FOR_EACH_OBSERVER( 750 FOR_EACH_OBSERVER(
755 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); 751 DriveServiceObserver, observers_, OnRefreshTokenInvalid());
756 } 752 }
757 } 753 }
758 754
759 } // namespace drive 755 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_api_service.h ('k') | chrome/browser/drive/drive_api_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698