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

Side by Side Diff: chrome/browser/google_apis/fake_drive_service.cc

Issue 13602003: Add new methods to DriveServiceInterface. These will replace GetResourceList. (Closed) Base URL: http://git.chromium.org/chromium/src.git@webkit_master
Patch Set: Created 7 years, 8 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/google_apis/fake_drive_service.h" 5 #include "chrome/browser/google_apis/fake_drive_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 329
330 ++resource_list_load_count_; 330 ++resource_list_load_count_;
331 MessageLoop::current()->PostTask( 331 MessageLoop::current()->PostTask(
332 FROM_HERE, 332 FROM_HERE,
333 base::Bind(callback, 333 base::Bind(callback,
334 HTTP_SUCCESS, 334 HTTP_SUCCESS,
335 base::Passed(&resource_list))); 335 base::Passed(&resource_list)));
336 } 336 }
337 337
338 void FakeDriveService::GetAllResourceList(
339 const GetResourceListCallback& callback) {
340 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
341 DCHECK(!callback.is_null());
342
343 // TODO(hidehiko): Implement this.
344 NOTIMPLEMENTED();
345 }
346
347 void FakeDriveService::GetResourceListInDirectory(
348 const std::string& directory_resource_id,
349 const GetResourceListCallback& callback) {
350 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
351 DCHECK(!directory_resource_id.empty());
352 DCHECK(!callback.is_null());
353
354 // TODO(hidehiko): Implement this.
355 NOTIMPLEMENTED();
356 }
357
358 void FakeDriveService::Search(const std::string& search_query,
359 const GetResourceListCallback& callback) {
360 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
361 DCHECK(!search_query.empty());
362 DCHECK(!callback.is_null());
363
364 // TODO(hidehiko): Implement this.
365 NOTIMPLEMENTED();
366 }
367
368 void FakeDriveService::SearchInDirectory(
369 const std::string& search_query,
370 const std::string& directory_resource_id,
371 const GetResourceListCallback& callback) {
372 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
373 DCHECK(!search_query.empty());
374 DCHECK(!directory_resource_id.empty());
375 DCHECK(!callback.is_null());
376
377 // TODO(hidehiko): Implement this.
378 NOTIMPLEMENTED();
379 }
380
381 void FakeDriveService::GetChangeList(int64 start_changestamp,
382 const GetResourceListCallback& callback) {
383 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
384 DCHECK(!callback.is_null());
385
386 // TODO(hidehiko): Implement this.
387 NOTIMPLEMENTED();
388 }
389
390 void FakeDriveService::ContinueGetResourceList(
391 const GURL& override_url,
392 const GetResourceListCallback& callback) {
393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
394 DCHECK(!callback.is_null());
395
396 // TODO(hidehiko): Implement this.
397 NOTIMPLEMENTED();
398 }
399
338 void FakeDriveService::GetResourceEntry( 400 void FakeDriveService::GetResourceEntry(
339 const std::string& resource_id, 401 const std::string& resource_id,
340 const GetResourceEntryCallback& callback) { 402 const GetResourceEntryCallback& callback) {
341 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 403 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
342 DCHECK(!callback.is_null()); 404 DCHECK(!callback.is_null());
343 405
344 if (offline_) { 406 if (offline_) {
345 scoped_ptr<ResourceEntry> null; 407 scoped_ptr<ResourceEntry> null;
346 MessageLoop::current()->PostTask( 408 MessageLoop::current()->PostTask(
347 FROM_HERE, 409 FROM_HERE,
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 1152
1091 base::DictionaryValue* raw_new_entry = new_entry.release(); 1153 base::DictionaryValue* raw_new_entry = new_entry.release();
1092 base::ListValue* entries = NULL; 1154 base::ListValue* entries = NULL;
1093 if (resource_list_dict->GetList("entry", &entries)) 1155 if (resource_list_dict->GetList("entry", &entries))
1094 entries->Append(raw_new_entry); 1156 entries->Append(raw_new_entry);
1095 1157
1096 return raw_new_entry; 1158 return raw_new_entry;
1097 } 1159 }
1098 1160
1099 } // namespace google_apis 1161 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/fake_drive_service.h ('k') | chrome/browser/google_apis/gdata_wapi_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698