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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_documents_service.cc

Issue 10830300: Add GetFilelist/GetFile operations for Drive V2 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for comments. Created 8 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
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/gdata/gdata_documents_service.h" 5 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 GetDocumentsOperation* operation = 104 GetDocumentsOperation* operation =
105 new GetDocumentsOperation(operation_registry(), 105 new GetDocumentsOperation(operation_registry(),
106 url, 106 url,
107 start_changestamp, 107 start_changestamp,
108 search_query, 108 search_query,
109 directory_resource_id, 109 directory_resource_id,
110 callback); 110 callback);
111 runner_->StartOperationWithRetry(operation); 111 runner_->StartOperationWithRetry(operation);
112 } 112 }
113 113
114 void DocumentsService::GetFilelist(const GURL& url,
115 const std::string& search_query,
116 const GetDataCallback& callback) {
117 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
118
119 GetFilelistOperation* operation =
120 new GetFilelistOperation(operation_registry(),
121 url,
122 search_query,
123 callback);
124 runner_->StartOperationWithRetry(operation);
125 }
126
114 void DocumentsService::GetChangelist(const GURL& url, 127 void DocumentsService::GetChangelist(const GURL& url,
115 int64 start_changestamp, 128 int64 start_changestamp,
116 const GetDataCallback& callback) { 129 const GetDataCallback& callback) {
117 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 130 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
118 131
119 GetChangelistOperation* operation = 132 GetChangelistOperation* operation =
120 new GetChangelistOperation(operation_registry(), 133 new GetChangelistOperation(operation_registry(),
121 url, 134 url,
122 start_changestamp, 135 start_changestamp,
123 callback); 136 callback);
124 runner_->StartOperationWithRetry(operation); 137 runner_->StartOperationWithRetry(operation);
125 } 138 }
126 139
127 void DocumentsService::GetDocumentEntry(const std::string& resource_id, 140 void DocumentsService::GetDocumentEntry(const std::string& resource_id,
128 const GetDataCallback& callback) { 141 const GetDataCallback& callback) {
129 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 142 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
130 143
131 GetDocumentEntryOperation* operation = 144 GetDocumentEntryOperation* operation =
132 new GetDocumentEntryOperation(operation_registry(), 145 new GetDocumentEntryOperation(operation_registry(),
133 resource_id, 146 resource_id,
134 callback); 147 callback);
135 runner_->StartOperationWithRetry(operation); 148 runner_->StartOperationWithRetry(operation);
136 } 149 }
137 150
151 void DocumentsService::GetFile(const std::string& file_id,
152 const GetDataCallback& callback) {
153 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
154
155 GetFileOperation* operation =
156 new GetFileOperation(operation_registry(),
157 file_id,
158 callback);
159 runner_->StartOperationWithRetry(operation);
160 }
161
138 void DocumentsService::GetAccountMetadata(const GetDataCallback& callback) { 162 void DocumentsService::GetAccountMetadata(const GetDataCallback& callback) {
139 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 163 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
140 164
141 GetAccountMetadataOperation* operation = 165 GetAccountMetadataOperation* operation =
142 new GetAccountMetadataOperation(operation_registry(), callback); 166 new GetAccountMetadataOperation(operation_registry(), callback);
143 runner_->StartOperationWithRetry(operation); 167 runner_->StartOperationWithRetry(operation);
144 } 168 }
145 169
146 void DocumentsService::GetAboutResource(const GetDataCallback& callback) { 170 void DocumentsService::GetAboutResource(const GetDataCallback& callback) {
147 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 171 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return runner_->auth_service()->HasAccessToken(); 323 return runner_->auth_service()->HasAccessToken();
300 } 324 }
301 325
302 bool DocumentsService::HasRefreshToken() const { 326 bool DocumentsService::HasRefreshToken() const {
303 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 327 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
304 328
305 return runner_->auth_service()->HasRefreshToken(); 329 return runner_->auth_service()->HasRefreshToken();
306 } 330 }
307 331
308 } // namespace gdata 332 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_documents_service.h ('k') | chrome/browser/chromeos/gdata/mock_gdata_documents_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698