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

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

Issue 10383248: gdata: Add ability to fetch documents in a particular directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build Created 8 years, 7 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 gdata_documents_service.h 5 // This file contains mocks for classes in gdata_documents_service.h
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_
8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ 8 #define CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 // DocumentsService is usually owned and created by GDataFileSystem. 25 // DocumentsService is usually owned and created by GDataFileSystem.
26 MockDocumentsService(); 26 MockDocumentsService();
27 virtual ~MockDocumentsService(); 27 virtual ~MockDocumentsService();
28 28
29 // DocumentServiceInterface overrides. 29 // DocumentServiceInterface overrides.
30 MOCK_METHOD1(Initialize, void(Profile* profile)); 30 MOCK_METHOD1(Initialize, void(Profile* profile));
31 MOCK_CONST_METHOD0(operation_registry, GDataOperationRegistry*()); 31 MOCK_CONST_METHOD0(operation_registry, GDataOperationRegistry*());
32 MOCK_METHOD0(CancelAll, void(void)); 32 MOCK_METHOD0(CancelAll, void(void));
33 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback)); 33 MOCK_METHOD1(Authenticate, void(const AuthStatusCallback& callback));
34 MOCK_METHOD4(GetDocuments, void(const GURL& feed_url, 34 MOCK_METHOD5(GetDocuments, void(const GURL& feed_url,
35 int start_changestamp, 35 int start_changestamp,
36 const std::string& search_string, 36 const std::string& search_string,
37 const std::string& directory_resource_id,
37 const GetDataCallback& callback)); 38 const GetDataCallback& callback));
38 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback)); 39 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback));
39 MOCK_METHOD2(DeleteDocument, void(const GURL& document_url, 40 MOCK_METHOD2(DeleteDocument, void(const GURL& document_url,
40 const EntryActionCallback& callback)); 41 const EntryActionCallback& callback));
41 MOCK_METHOD5(DownloadDocument, void(const FilePath& virtual_path, 42 MOCK_METHOD5(DownloadDocument, void(const FilePath& virtual_path,
42 const FilePath& local_cache_path, 43 const FilePath& local_cache_path,
43 const GURL& content_url, 44 const GURL& content_url,
44 DocumentExportFormat format, 45 DocumentExportFormat format,
45 const DownloadActionCallback& callback)); 46 const DownloadActionCallback& callback));
46 MOCK_METHOD3(CopyDocument, void(const std::string& resource_id, 47 MOCK_METHOD3(CopyDocument, void(const std::string& resource_id,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 80
80 // Will call |callback| with HTTP_SUCCESS and the token "test_auth_token" 81 // Will call |callback| with HTTP_SUCCESS and the token "test_auth_token"
81 // as the token. 82 // as the token.
82 void AuthenticateStub(const AuthStatusCallback& callback); 83 void AuthenticateStub(const AuthStatusCallback& callback);
83 84
84 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current 85 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current
85 // value of |feed_data_|. 86 // value of |feed_data_|.
86 void GetDocumentsStub(const GURL& feed_url, 87 void GetDocumentsStub(const GURL& feed_url,
87 int start_changestamp, 88 int start_changestamp,
88 const std::string& search_string, 89 const std::string& search_string,
90 const std::string& directory_resource_id,
89 const GetDataCallback& callback); 91 const GetDataCallback& callback);
90 92
91 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current 93 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current
92 // value of |account_metadata_|. 94 // value of |account_metadata_|.
93 void GetAccountMetadataStub(const GetDataCallback& callback); 95 void GetAccountMetadataStub(const GetDataCallback& callback);
94 96
95 // Will call |callback| with HTTP_SUCCESS and the |document_url|. 97 // Will call |callback| with HTTP_SUCCESS and the |document_url|.
96 void DeleteDocumentStub(const GURL& document_url, 98 void DeleteDocumentStub(const GURL& document_url,
97 const EntryActionCallback& callback); 99 const EntryActionCallback& callback);
98 100
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 scoped_ptr<base::Value> search_result_; 178 scoped_ptr<base::Value> search_result_;
177 179
178 // File data to be written to the local temporary file when 180 // File data to be written to the local temporary file when
179 // DownloadDocumentStub is called. 181 // DownloadDocumentStub is called.
180 scoped_ptr<std::string> file_data_; 182 scoped_ptr<std::string> file_data_;
181 }; 183 };
182 184
183 } // namespace gdata 185 } // namespace gdata
184 186
185 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ 187 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations.cc ('k') | chrome/browser/chromeos/gdata/mock_gdata_documents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698