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

Unified Diff: chrome/browser/drive/fake_drive_service.h

Issue 17140009: Support contents upload on FakeDriveService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +completion callback Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/drive/fake_drive_service.h
diff --git a/chrome/browser/drive/fake_drive_service.h b/chrome/browser/drive/fake_drive_service.h
index f2b0fe4aa42398e96dd08535b7df27491f84cc68..8c9c6eefc6c9bf348b01cd7267f0f5d5913f1274 100644
--- a/chrome/browser/drive/fake_drive_service.h
+++ b/chrome/browser/drive/fake_drive_service.h
@@ -211,6 +211,8 @@ class FakeDriveService : public DriveServiceInterface {
const google_apis::GetResourceEntryCallback& callback);
private:
+ struct UploadSession;
+
// Returns a pointer to the entry that matches |resource_id|, or NULL if
// not found.
base::DictionaryValue* FindEntryByResourceId(const std::string& resource_id);
@@ -219,17 +221,13 @@ class FakeDriveService : public DriveServiceInterface {
// not found.
base::DictionaryValue* FindEntryByContentUrl(const GURL& content_url);
- // Returns a pointer to the entry that matches |upload_url|, or NULL if
- // not found.
- base::DictionaryValue* FindEntryByUploadUrl(const GURL& upload_url);
-
// Returns a new resource ID, which looks like "resource_id_<num>" where
// <num> is a monotonically increasing number starting from 1.
std::string GetNewResourceId();
- // Increments |largest_changestamp_| and adds the new changestamp to
+ // Increments |largest_changestamp_| and adds the new changestamp and ETag to
// |entry|.
- void AddNewChangestamp(base::DictionaryValue* entry);
+ void AddNewChangestampAndETag(base::DictionaryValue* entry);
// Adds a new entry based on the given parameters. |entry_kind| should be
// "file" or "folder". Returns a pointer to the newly added entry, or NULL
@@ -256,11 +254,16 @@ class FakeDriveService : public DriveServiceInterface {
int* load_counter,
const google_apis::GetResourceListCallback& callback);
+ // Returns new upload session URL.
+ GURL GetNewUploadSessionUrl();
+
scoped_ptr<base::DictionaryValue> resource_list_value_;
scoped_ptr<base::Value> account_metadata_value_;
scoped_ptr<base::Value> app_info_value_;
+ std::map<GURL, UploadSession> upload_sessions_;
int64 largest_changestamp_;
int64 published_date_seq_;
+ int64 next_upload_sequence_number_;
int default_max_results_;
int resource_id_count_;
int resource_list_load_count_;
« no previous file with comments | « no previous file | chrome/browser/drive/fake_drive_service.cc » ('j') | chrome/browser/drive/fake_drive_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698