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

Side by Side Diff: chrome/browser/chromeos/gdata/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 #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 //
78 // |search_query| specifies search query to be sent to the server. It will be 79 // |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 // used only if |start_changestamp| is 0. If empty string is passed,
80 // |search_query| is ignored. 81 // |search_query| is ignored.
82 //
83 // |directory_resource_id| specifies the directory from which documents are
84 // fetched. It will be used only if |start_changestamp| is 0. If empty
85 // string is passed, |directory_resource_id| is ignored.
86 //
81 // Upon completion, invokes |callback| with results on the calling thread. 87 // Upon completion, invokes |callback| with results on the calling thread.
88 // TODO(satorux): Refactor this function: crbug.com/128746
82 virtual void GetDocuments(const GURL& feed_url, 89 virtual void GetDocuments(const GURL& feed_url,
83 int start_changestamp, 90 int start_changestamp,
84 const std::string& search_query, 91 const std::string& search_query,
92 const std::string& directory_resource_id,
85 const GetDataCallback& callback) = 0; 93 const GetDataCallback& callback) = 0;
86 94
87 // Gets the account metadata from the server using the default account 95 // Gets the account metadata from the server using the default account
88 // metadata URL. Upon completion, invokes |callback| with results on the 96 // metadata URL. Upon completion, invokes |callback| with results on the
89 // calling thread. 97 // calling thread.
90 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0; 98 virtual void GetAccountMetadata(const GetDataCallback& callback) = 0;
91 99
92 // Deletes a document identified by its 'self' |url| and |etag|. 100 // Deletes a document identified by its 'self' |url| and |etag|.
93 // Upon completion, invokes |callback| with results on the calling thread. 101 // Upon completion, invokes |callback| with results on the calling thread.
94 virtual void DeleteDocument(const GURL& document_url, 102 virtual void DeleteDocument(const GURL& document_url,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 virtual ~DocumentsService(); 184 virtual ~DocumentsService();
177 185
178 // DocumentsServiceInterface Overrides 186 // DocumentsServiceInterface Overrides
179 virtual void Initialize(Profile* profile) OVERRIDE; 187 virtual void Initialize(Profile* profile) OVERRIDE;
180 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; 188 virtual GDataOperationRegistry* operation_registry() const OVERRIDE;
181 virtual void CancelAll() OVERRIDE; 189 virtual void CancelAll() OVERRIDE;
182 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; 190 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE;
183 virtual void GetDocuments(const GURL& feed_url, 191 virtual void GetDocuments(const GURL& feed_url,
184 int start_changestamp, 192 int start_changestamp,
185 const std::string& search_query, 193 const std::string& search_query,
194 const std::string& directory_resource_id,
186 const GetDataCallback& callback) OVERRIDE; 195 const GetDataCallback& callback) OVERRIDE;
187 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; 196 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE;
188 virtual void DeleteDocument(const GURL& document_url, 197 virtual void DeleteDocument(const GURL& document_url,
189 const EntryActionCallback& callback) OVERRIDE; 198 const EntryActionCallback& callback) OVERRIDE;
190 virtual void DownloadDocument( 199 virtual void DownloadDocument(
191 const FilePath& virtual_path, 200 const FilePath& virtual_path,
192 const FilePath& local_cache_path, 201 const FilePath& local_cache_path,
193 const GURL& content_url, 202 const GURL& content_url,
194 DocumentExportFormat format, 203 DocumentExportFormat format,
195 const DownloadActionCallback& callback) OVERRIDE; 204 const DownloadActionCallback& callback) OVERRIDE;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 scoped_ptr<GDataOperationRegistry> operation_registry_; 261 scoped_ptr<GDataOperationRegistry> operation_registry_;
253 base::WeakPtrFactory<DocumentsService> weak_ptr_factory_; 262 base::WeakPtrFactory<DocumentsService> weak_ptr_factory_;
254 base::WeakPtr<DocumentsService> weak_ptr_bound_to_ui_thread_; 263 base::WeakPtr<DocumentsService> weak_ptr_bound_to_ui_thread_;
255 264
256 DISALLOW_COPY_AND_ASSIGN(DocumentsService); 265 DISALLOW_COPY_AND_ASSIGN(DocumentsService);
257 }; 266 };
258 267
259 } // namespace gdata 268 } // namespace gdata
260 269
261 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 270 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698