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

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

Issue 11143014: Add request header on gdata operation for testing ETag match. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 8 years, 2 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/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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 runner_->StartOperationWithRetry( 159 runner_->StartOperationWithRetry(
160 new gdata::GetApplistOperation(operation_registry(), callback)); 160 new gdata::GetApplistOperation(operation_registry(), callback));
161 } 161 }
162 162
163 void DriveAPIService::DownloadDocument( 163 void DriveAPIService::DownloadDocument(
164 const FilePath& virtual_path, 164 const FilePath& virtual_path,
165 const FilePath& local_cache_path, 165 const FilePath& local_cache_path,
166 const GURL& document_url, 166 const GURL& document_url,
167 DocumentExportFormat format, 167 DocumentExportFormat format,
168 const std::string& etag,
168 const gdata::DownloadActionCallback& callback) { 169 const gdata::DownloadActionCallback& callback) {
169 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
170 171
171 // TODO(kochi): Implement this. 172 // TODO(kochi): Implement this.
172 NOTREACHED(); 173 NOTREACHED();
173 } 174 }
174 175
175 void DriveAPIService::DownloadFile( 176 void DriveAPIService::DownloadFile(
176 const FilePath& virtual_path, 177 const FilePath& virtual_path,
177 const FilePath& local_cache_path, 178 const FilePath& local_cache_path,
178 const GURL& document_url, 179 const GURL& document_url,
180 const std::string& etag,
179 const gdata::DownloadActionCallback& download_action_callback, 181 const gdata::DownloadActionCallback& download_action_callback,
180 const gdata::GetContentCallback& get_content_callback) { 182 const gdata::GetContentCallback& get_content_callback) {
181 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 183 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
182 184
183 // TODO(kochi): Implement this. 185 // TODO(kochi): Implement this.
184 NOTREACHED(); 186 NOTREACHED();
185 } 187 }
186 188
187 void DriveAPIService::DeleteDocument( 189 void DriveAPIService::DeleteDocument(
188 const GURL& document_url, 190 const GURL& document_url,
191 const std::string& etag,
189 const gdata::EntryActionCallback& callback) { 192 const gdata::EntryActionCallback& callback) {
190 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 193 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
191 194
192 // TODO(kochi): Implement this. 195 // TODO(kochi): Implement this.
193 NOTREACHED(); 196 NOTREACHED();
194 } 197 }
195 198
196 void DriveAPIService::CreateDirectory( 199 void DriveAPIService::CreateDirectory(
197 const GURL& parent_content_url, 200 const GURL& parent_content_url,
198 const FilePath::StringType& directory_name, 201 const FilePath::StringType& directory_name,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 DriveServiceObserver, observers_, OnProgressUpdate(list)); 304 DriveServiceObserver, observers_, OnProgressUpdate(list));
302 } 305 }
303 306
304 void DriveAPIService::OnAuthenticationFailed(gdata::GDataErrorCode error) { 307 void DriveAPIService::OnAuthenticationFailed(gdata::GDataErrorCode error) {
305 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 308 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
306 FOR_EACH_OBSERVER( 309 FOR_EACH_OBSERVER(
307 DriveServiceObserver, observers_, OnAuthenticationFailed(error)); 310 DriveServiceObserver, observers_, OnAuthenticationFailed(error));
308 } 311 }
309 312
310 } // namespace drive 313 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698