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

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: split out indentation fix 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..e6af4e8d8ee86bc1b04d2aac8d9dc6312a976427 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,10 +221,6 @@ 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();
@@ -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_session_;
hashimoto 2013/06/21 04:16:21 nit: How about renaming this variable to something
tzik 2013/06/21 05:06:52 Done.
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_;
@@ -270,6 +273,8 @@ class FakeDriveService : public DriveServiceInterface {
bool offline_;
base::FilePath last_cancelled_file_;
+ base::WeakPtrFactory<FakeDriveService> weak_factory_;
hashimoto 2013/06/21 04:16:21 nit: In this directory, we usually name WeakPtrFac
tzik 2013/06/21 05:06:52 Let me drop this. The class no longer uses WeakPtr
+
DISALLOW_COPY_AND_ASSIGN(FakeDriveService);
};
« 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