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

Side by Side Diff: chrome/browser/chromeos/gdata/mock_drive_service.h

Issue 10939011: Reland "Revert 156830 - drive: Stop exposing operation_registry() from DriveServiceInterface" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 // This file contains mocks for classes in drive_service_interface.h 5 // This file contains mocks for classes in drive_service_interface.h
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_
8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ 8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" 13 #include "chrome/browser/chromeos/gdata/drive_service_interface.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 15
16 class FilePath; 16 class FilePath;
17 17
18 namespace gdata { 18 namespace gdata {
19 19
20 class MockDriveService : public DriveServiceInterface { 20 class MockDriveService : public DriveServiceInterface {
21 public: 21 public:
22 // DriveService is usually owned and created by DriveFileSystem. 22 // DriveService is usually owned and created by DriveFileSystem.
23 MockDriveService(); 23 MockDriveService();
24 virtual ~MockDriveService(); 24 virtual ~MockDriveService();
25 25
26 // DriveServiceInterface overrides. 26 // DriveServiceInterface overrides.
27 MOCK_METHOD1(Initialize, void(Profile* profile)); 27 MOCK_METHOD1(Initialize, void(Profile* profile));
28 MOCK_METHOD1(AddObserver, void(DriveServiceObserver* observer)); 28 MOCK_METHOD1(AddObserver, void(DriveServiceObserver* observer));
29 MOCK_METHOD1(RemoveObserver, void(DriveServiceObserver* observer)); 29 MOCK_METHOD1(RemoveObserver, void(DriveServiceObserver* observer));
30 MOCK_CONST_METHOD0(operation_registry, OperationRegistry*());
31 MOCK_CONST_METHOD0(CanStartOperation, bool()); 30 MOCK_CONST_METHOD0(CanStartOperation, bool());
32 MOCK_METHOD0(CancelAll, void(void)); 31 MOCK_METHOD0(CancelAll, void(void));
32 MOCK_METHOD1(CancelForFilePath, bool(const FilePath& file_path));
33 MOCK_CONST_METHOD0(GetProgressStatusList, OperationProgressStatusList());
33 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); 34 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback));
34 MOCK_METHOD5(GetDocuments, void(const GURL& feed_url, 35 MOCK_METHOD5(GetDocuments, void(const GURL& feed_url,
35 int64 start_changestamp, 36 int64 start_changestamp,
36 const std::string& search_string, 37 const std::string& search_string,
37 const std::string& directory_resource_id, 38 const std::string& directory_resource_id,
38 const GetDataCallback& callback)); 39 const GetDataCallback& callback));
39 MOCK_METHOD2(GetDocumentEntry, void(const std::string& resource_id, 40 MOCK_METHOD2(GetDocumentEntry, void(const std::string& resource_id,
40 const GetDataCallback& callback)); 41 const GetDataCallback& callback));
41 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback)); 42 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback));
42 MOCK_METHOD1(GetApplicationInfo, void(const GetDataCallback& callback)); 43 MOCK_METHOD1(GetApplicationInfo, void(const GetDataCallback& callback));
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 scoped_ptr<base::Value> search_result_; 189 scoped_ptr<base::Value> search_result_;
189 190
190 // File data to be written to the local temporary file when 191 // File data to be written to the local temporary file when
191 // DownloadDocumentStub is called. 192 // DownloadDocumentStub is called.
192 scoped_ptr<std::string> file_data_; 193 scoped_ptr<std::string> file_data_;
193 }; 194 };
194 195
195 } // namespace gdata 196 } // namespace gdata
196 197
197 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_ 198 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_DRIVE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_wapi_service.cc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698