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

Unified Diff: chrome/browser/chromeos/gdata/mock_gdata_uploader.h

Issue 10832241: Drive: Removes unused cache files after the initial feed fetch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the build error. Created 8 years, 4 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/chromeos/gdata/mock_gdata_uploader.h
diff --git a/chrome/browser/chromeos/gdata/mock_gdata_uploader.h b/chrome/browser/chromeos/gdata/mock_gdata_uploader.h
new file mode 100644
index 0000000000000000000000000000000000000000..097c183bdff3457646d8a0c32843582bb426c728
--- /dev/null
+++ b/chrome/browser/chromeos/gdata/mock_gdata_uploader.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_UPLOADER_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_UPLOADER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
+#include "chrome/browser/chromeos/gdata/drive_file_system.h"
+#include "chrome/browser/chromeos/gdata/gdata_uploader.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace gdata {
+
+class MockGDataUploader : public GDataUploaderInterface {
+ public:
+ MockGDataUploader();
+ virtual ~MockGDataUploader();
+ // This function is not mockable by gmock.
+ virtual int UploadNewFile(
+ scoped_ptr<UploadFileInfo> upload_file_info) OVERRIDE {
+ const int kUploadId = 123;
+ return kUploadId;
+ }
+
+ // This function is not mockable by gmock.
+ virtual int StreamExistingFile(
+ scoped_ptr<UploadFileInfo> upload_file_info) OVERRIDE { return 0; }
+
+ MOCK_METHOD6(UploadExistingFile,
+ int(const GURL& upload_location,
+ const FilePath& gdata_file_path,
+ const FilePath& local_file_path,
+ int64 file_size,
+ const std::string& content_type,
+ const UploadFileInfo::UploadCompletionCallback& callback));
+
+ MOCK_METHOD2(UpdateUpload, void(int upload_id,
+ content::DownloadItem* download));
+ MOCK_CONST_METHOD1(GetUploadedBytes, int64(int upload_id));
+};
+
+} // namespace gdata
+
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_UPLOADER_H_

Powered by Google App Engine
This is Rietveld 408576698