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

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: drop unused line 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
« no previous file with comments | « no previous file | chrome/browser/drive/fake_drive_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6b63715c92bf6bdc9cc0b6cca8029a226e60b9ec..efe8839a512817b195f8c7c738a507323407abf9 100644
--- a/chrome/browser/drive/fake_drive_service.h
+++ b/chrome/browser/drive/fake_drive_service.h
@@ -206,6 +206,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);
@@ -214,17 +216,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
@@ -251,11 +249,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698