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

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

Issue 10274002: Add gdata content search (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed satorux's comments 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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Authenticates the user by fetching the auth token as 69 // Authenticates the user by fetching the auth token as
70 // needed. |callback| will be run with the error code and the auth 70 // needed. |callback| will be run with the error code and the auth
71 // token, on the thread this function is run. 71 // token, on the thread this function is run.
72 virtual void Authenticate(const AuthStatusCallback& callback) = 0; 72 virtual void Authenticate(const AuthStatusCallback& callback) = 0;
73 73
74 // Fetches the document feed from |feed_url| with |start_changestamp|. If this 74 // Fetches the document feed from |feed_url| with |start_changestamp|. If this
75 // URL is empty, the call will fetch the default root or change document feed. 75 // URL is empty, the call will fetch the default root or change document feed.
76 // |start_changestamp| specifies the starting point from change feeds only. 76 // |start_changestamp| specifies the starting point from change feeds only.
77 // Value different than 0, it would trigger delta feed fetching. 77 // Value different than 0, it would trigger delta feed fetching.
78 // |search_query| specifies search query to be sent to the server. It will be
79 // used only if |start_changestamp| is 0. If empty string is passed,
80 // |search_query| is ignored.
78 // Upon completion, invokes |callback| with results on the calling thread. 81 // Upon completion, invokes |callback| with results on the calling thread.
79 virtual void GetDocuments(const GURL& feed_url, 82 virtual void GetDocuments(const GURL& feed_url,
80 int start_changestamp, 83 int start_changestamp,
84 const std::string& search_query,
81 const GetDataCallback& callback) = 0; 85 const GetDataCallback& callback) = 0;
82 86
83 // Gets the account metadata from the server using the default account 87 // Gets the account metadata from the server using the default account
84 // metadata URL. Upon completion, invokes |callback| with results on the 88 // metadata URL. Upon completion, invokes |callback| with results on the
85 // calling thread. 89 // calling thread.
86 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0; 90 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0;
87 91
88 // Deletes a document identified by its 'self' |url| and |etag|. 92 // Deletes a document identified by its 'self' |url| and |etag|.
89 // Upon completion, invokes |callback| with results on the calling thread. 93 // Upon completion, invokes |callback| with results on the calling thread.
90 virtual void DeleteDocument(const GURL& document_url, 94 virtual void DeleteDocument(const GURL& document_url,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 DocumentsService(); 175 DocumentsService();
172 virtual ~DocumentsService(); 176 virtual ~DocumentsService();
173 177
174 // DocumentsServiceInterface Overrides 178 // DocumentsServiceInterface Overrides
175 virtual void Initialize(Profile* profile) OVERRIDE; 179 virtual void Initialize(Profile* profile) OVERRIDE;
176 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; 180 virtual GDataOperationRegistry* operation_registry() const OVERRIDE;
177 virtual void CancelAll() OVERRIDE; 181 virtual void CancelAll() OVERRIDE;
178 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; 182 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE;
179 virtual void GetDocuments(const GURL& feed_url, 183 virtual void GetDocuments(const GURL& feed_url,
180 int start_changestamp, 184 int start_changestamp,
185 const std::string& search_query,
181 const GetDataCallback& callback) OVERRIDE; 186 const GetDataCallback& callback) OVERRIDE;
182 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; 187 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE;
183 virtual void DeleteDocument(const GURL& document_url, 188 virtual void DeleteDocument(const GURL& document_url,
184 const EntryActionCallback& callback) OVERRIDE; 189 const EntryActionCallback& callback) OVERRIDE;
185 virtual void DownloadDocument( 190 virtual void DownloadDocument(
186 const FilePath& virtual_path, 191 const FilePath& virtual_path,
187 const FilePath& local_cache_path, 192 const FilePath& local_cache_path,
188 const GURL& content_url, 193 const GURL& content_url,
189 DocumentExportFormat format, 194 DocumentExportFormat format,
190 const DownloadActionCallback& callback) OVERRIDE; 195 const DownloadActionCallback& callback) OVERRIDE;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 scoped_ptr<GDataOperationRegistry> operation_registry_; 252 scoped_ptr<GDataOperationRegistry> operation_registry_;
248 base::WeakPtrFactory<DocumentsService> weak_ptr_factory_; 253 base::WeakPtrFactory<DocumentsService> weak_ptr_factory_;
249 base::WeakPtr<DocumentsService> weak_ptr_bound_to_ui_thread_; 254 base::WeakPtr<DocumentsService> weak_ptr_bound_to_ui_thread_;
250 255
251 DISALLOW_COPY_AND_ASSIGN(DocumentsService); 256 DISALLOW_COPY_AND_ASSIGN(DocumentsService);
252 }; 257 };
253 258
254 } // namespace gdata 259 } // namespace gdata
255 260
256 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 261 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698