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

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

Issue 10274002: Add gdata content search (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a nit 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_METHOD3(GetDocuments, void(const GURL& feed_url, 34 MOCK_METHOD4(GetDocuments, void(const GURL& feed_url,
35 int start_changestamp, 35 int start_changestamp,
36 const std::string& search_string,
36 const GetDataCallback& callback)); 37 const GetDataCallback& callback));
37 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback)); 38 MOCK_METHOD1(GetAccountMetadata, void(const GetDataCallback& callback));
38 MOCK_METHOD2(DeleteDocument, void(const GURL& document_url, 39 MOCK_METHOD2(DeleteDocument, void(const GURL& document_url,
39 const EntryActionCallback& callback)); 40 const EntryActionCallback& callback));
40 MOCK_METHOD5(DownloadDocument, void(const FilePath& virtual_path, 41 MOCK_METHOD5(DownloadDocument, void(const FilePath& virtual_path,
41 const FilePath& local_cache_path, 42 const FilePath& local_cache_path,
42 const GURL& content_url, 43 const GURL& content_url,
43 DocumentExportFormat format, 44 DocumentExportFormat format,
44 const DownloadActionCallback& callback)); 45 const DownloadActionCallback& callback));
45 MOCK_METHOD3(CopyDocument, void(const std::string& resource_id, 46 MOCK_METHOD3(CopyDocument, void(const std::string& resource_id,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // the callbacks get called with testable results. 78 // the callbacks get called with testable results.
78 79
79 // Will call |callback| with HTTP_SUCCESS and the token "test_auth_token" 80 // Will call |callback| with HTTP_SUCCESS and the token "test_auth_token"
80 // as the token. 81 // as the token.
81 void AuthenticateStub(const AuthStatusCallback& callback); 82 void AuthenticateStub(const AuthStatusCallback& callback);
82 83
83 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current 84 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current
84 // value of |feed_data_|. 85 // value of |feed_data_|.
85 void GetDocumentsStub(const GURL& feed_url, 86 void GetDocumentsStub(const GURL& feed_url,
86 int start_changestamp, 87 int start_changestamp,
88 const std::string& search_string,
87 const GetDataCallback& callback); 89 const GetDataCallback& callback);
88 90
89 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current 91 // Will call |callback| with HTTP_SUCCESS and a StringValue with the current
90 // value of |account_metadata_|. 92 // value of |account_metadata_|.
91 void GetAccountMetadataStub(const GetDataCallback& callback); 93 void GetAccountMetadataStub(const GetDataCallback& callback);
92 94
93 // Will call |callback| with HTTP_SUCCESS and the |document_url|. 95 // Will call |callback| with HTTP_SUCCESS and the |document_url|.
94 void DeleteDocumentStub(const GURL& document_url, 96 void DeleteDocumentStub(const GURL& document_url,
95 const EntryActionCallback& callback); 97 const EntryActionCallback& callback);
96 98
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 scoped_ptr<base::Value> account_metadata_; 158 scoped_ptr<base::Value> account_metadata_;
157 159
158 // Feed data to be returned from GetDocuments. 160 // Feed data to be returned from GetDocuments.
159 scoped_ptr<base::Value> feed_data_; 161 scoped_ptr<base::Value> feed_data_;
160 162
161 // Feed data to be returned from CreateDirectory. 163 // Feed data to be returned from CreateDirectory.
162 scoped_ptr<base::Value> directory_data_; 164 scoped_ptr<base::Value> directory_data_;
163 165
164 // Feed data to be returned from CopyDocument. 166 // Feed data to be returned from CopyDocument.
165 scoped_ptr<base::Value> document_data_; 167 scoped_ptr<base::Value> document_data_;
168
169 // Feed data to be returned from GetDocuments if the search path is specified.
170 // The feed contains subset of the root_feed.
171 scoped_ptr<base::Value> search_result_;
166 }; 172 };
167 173
168 } // namespace gdata 174 } // namespace gdata
169 175
170 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_ 176 #endif // CHROME_BROWSER_CHROMEOS_GDATA_MOCK_GDATA_DOCUMENTS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698