OLD | NEW |
---|---|
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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 | 177 |
178 // Resumes uploading of a document/file on the calling thread. | 178 // Resumes uploading of a document/file on the calling thread. |
179 virtual void ResumeUpload(const ResumeUploadParams& params, | 179 virtual void ResumeUpload(const ResumeUploadParams& params, |
180 const ResumeUploadCallback& callback) = 0; | 180 const ResumeUploadCallback& callback) = 0; |
181 | 181 |
182 // Authorizes a Drive app with the id |app_id| to open the given document. | 182 // Authorizes a Drive app with the id |app_id| to open the given document. |
183 // Upon completion, invokes |callback| with results on the calling thread. | 183 // Upon completion, invokes |callback| with results on the calling thread. |
184 virtual void AuthorizeApp(const GURL& resource_url, | 184 virtual void AuthorizeApp(const GURL& resource_url, |
185 const std::string& app_id, | 185 const std::string& app_id, |
186 const GetDataCallback& callback) = 0; | 186 const GetDataCallback& callback) = 0; |
187 | |
188 // True if OAuth2 auth token is retrieved and believed to be fresh. | |
189 virtual bool IsFullyAuthenticated() const = 0; | |
190 | |
191 // True if OAuth2 refresh token is present. | |
192 virtual bool IsPartiallyAuthenticated() const = 0; | |
Daniel Erat
2012/07/24 20:31:08
nit since you're just using the existing names in
satorux1
2012/07/24 20:52:01
That's a good suggestion. I'll create a patch to r
| |
187 }; | 193 }; |
188 | 194 |
189 // This class provides documents feed service calls. | 195 // This class provides documents feed service calls. |
190 class DocumentsService : public DocumentsServiceInterface { | 196 class DocumentsService : public DocumentsServiceInterface { |
191 public: | 197 public: |
192 // DocumentsService is usually owned and created by GDataFileSystem. | 198 // DocumentsService is usually owned and created by GDataFileSystem. |
193 DocumentsService(); | 199 DocumentsService(); |
194 virtual ~DocumentsService(); | 200 virtual ~DocumentsService(); |
195 | 201 |
196 GDataAuthService* auth_service_for_testing(); | 202 GDataAuthService* auth_service_for_testing(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
241 virtual void CreateDirectory(const GURL& parent_content_url, | 247 virtual void CreateDirectory(const GURL& parent_content_url, |
242 const FilePath::StringType& directory_name, | 248 const FilePath::StringType& directory_name, |
243 const GetDataCallback& callback) OVERRIDE; | 249 const GetDataCallback& callback) OVERRIDE; |
244 virtual void InitiateUpload(const InitiateUploadParams& params, | 250 virtual void InitiateUpload(const InitiateUploadParams& params, |
245 const InitiateUploadCallback& callback) OVERRIDE; | 251 const InitiateUploadCallback& callback) OVERRIDE; |
246 virtual void ResumeUpload(const ResumeUploadParams& params, | 252 virtual void ResumeUpload(const ResumeUploadParams& params, |
247 const ResumeUploadCallback& callback) OVERRIDE; | 253 const ResumeUploadCallback& callback) OVERRIDE; |
248 virtual void AuthorizeApp(const GURL& resource_url, | 254 virtual void AuthorizeApp(const GURL& resource_url, |
249 const std::string& app_id, | 255 const std::string& app_id, |
250 const GetDataCallback& callback) OVERRIDE; | 256 const GetDataCallback& callback) OVERRIDE; |
257 virtual bool IsFullyAuthenticated() const OVERRIDE; | |
258 virtual bool IsPartiallyAuthenticated() const OVERRIDE; | |
259 | |
251 private: | 260 private: |
252 Profile* profile_; | 261 Profile* profile_; |
253 | 262 |
254 scoped_ptr<GDataOperationRunner> runner_; | 263 scoped_ptr<GDataOperationRunner> runner_; |
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_ |
OLD | NEW |