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

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

Issue 9720020: [COPY] - Implemented API for tracking ongoing file transfers from file manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // 137 //
138 // TODO(zel,benchan): Make the terminology/naming convention (e.g. file vs 138 // TODO(zel,benchan): Make the terminology/naming convention (e.g. file vs
139 // document vs resource, directory vs collection) more consistent and precise. 139 // document vs resource, directory vs collection) more consistent and precise.
140 class DocumentsServiceInterface { 140 class DocumentsServiceInterface {
141 public: 141 public:
142 virtual ~DocumentsServiceInterface() {} 142 virtual ~DocumentsServiceInterface() {}
143 143
144 // Initializes the documents service tied with |profile|. 144 // Initializes the documents service tied with |profile|.
145 virtual void Initialize(Profile* profile) = 0; 145 virtual void Initialize(Profile* profile) = 0;
146 146
147 // Retrieves the operation registry.
148 virtual GDataOperationRegistry* operation_registry() const = 0;
149
147 // Cancels all in-flight operations. 150 // Cancels all in-flight operations.
148 virtual void CancelAll() = 0; 151 virtual void CancelAll() = 0;
149 152
150 // Authenticates the user by fetching the auth token as 153 // Authenticates the user by fetching the auth token as
151 // needed. |callback| will be run with the error code and the auth 154 // needed. |callback| will be run with the error code and the auth
152 // token, on the thread this function is run. 155 // token, on the thread this function is run.
153 // 156 //
154 // Can be called on any thread. 157 // Can be called on any thread.
155 virtual void Authenticate(const AuthStatusCallback& callback) = 0; 158 virtual void Authenticate(const AuthStatusCallback& callback) = 0;
156 159
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 class DocumentsService 265 class DocumentsService
263 : public DocumentsServiceInterface, 266 : public DocumentsServiceInterface,
264 public GDataAuthService::Observer { 267 public GDataAuthService::Observer {
265 public: 268 public:
266 // DocumentsService is usually owned and created by GDataFileSystem. 269 // DocumentsService is usually owned and created by GDataFileSystem.
267 DocumentsService(); 270 DocumentsService();
268 virtual ~DocumentsService(); 271 virtual ~DocumentsService();
269 272
270 // DocumentsServiceInterface Overrides 273 // DocumentsServiceInterface Overrides
271 virtual void Initialize(Profile* profile) OVERRIDE; 274 virtual void Initialize(Profile* profile) OVERRIDE;
275 virtual GDataOperationRegistry* operation_registry() const OVERRIDE;
272 virtual void CancelAll() OVERRIDE; 276 virtual void CancelAll() OVERRIDE;
273 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; 277 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE;
274 virtual void GetDocuments(const GURL& feed_url, 278 virtual void GetDocuments(const GURL& feed_url,
275 const GetDataCallback& callback) OVERRIDE; 279 const GetDataCallback& callback) OVERRIDE;
276 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE; 280 virtual void GetAccountMetadata(const GetDataCallback& callback) OVERRIDE;
277 virtual void DeleteDocument(const GURL& document_url, 281 virtual void DeleteDocument(const GURL& document_url,
278 const EntryActionCallback& callback) OVERRIDE; 282 const EntryActionCallback& callback) OVERRIDE;
279 virtual void DownloadDocument( 283 virtual void DownloadDocument(
280 const FilePath& virtual_path, 284 const FilePath& virtual_path,
281 const GURL& content_url, 285 const GURL& content_url,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 scoped_ptr<GDataOperationRegistry> operation_registry_; 349 scoped_ptr<GDataOperationRegistry> operation_registry_;
346 base::WeakPtrFactory<DocumentsService> weak_ptr_factory_; 350 base::WeakPtrFactory<DocumentsService> weak_ptr_factory_;
347 base::WeakPtr<DocumentsService> weak_ptr_bound_to_ui_thread_; 351 base::WeakPtr<DocumentsService> weak_ptr_bound_to_ui_thread_;
348 352
349 DISALLOW_COPY_AND_ASSIGN(DocumentsService); 353 DISALLOW_COPY_AND_ASSIGN(DocumentsService);
350 }; 354 };
351 355
352 } // namespace gdata 356 } // namespace gdata
353 357
354 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_H_ 358 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager_util.cc ('k') | chrome/browser/chromeos/gdata/gdata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698