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

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

Issue 10827018: gdata: Rename functions in GDataAuthService per OAuth2 terminology (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 187
188 // True if OAuth2 auth token is retrieved and believed to be fresh. 188 // True if OAuth2 access token is retrieved and believed to be fresh.
189 virtual bool IsFullyAuthenticated() const = 0; 189 virtual bool HasAccessToken() const = 0;
190 190
191 // True if OAuth2 refresh token is present. 191 // True if OAuth2 refresh token is present.
192 virtual bool IsPartiallyAuthenticated() const = 0; 192 virtual bool HasRefreshToken() const = 0;
193 }; 193 };
194 194
195 // This class provides documents feed service calls. 195 // This class provides documents feed service calls.
196 class DocumentsService : public DocumentsServiceInterface { 196 class DocumentsService : public DocumentsServiceInterface {
197 public: 197 public:
198 // DocumentsService is usually owned and created by GDataFileSystem. 198 // DocumentsService is usually owned and created by GDataFileSystem.
199 DocumentsService(); 199 DocumentsService();
200 virtual ~DocumentsService(); 200 virtual ~DocumentsService();
201 201
202 GDataAuthService* auth_service_for_testing(); 202 GDataAuthService* auth_service_for_testing();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 virtual void CreateDirectory(const GURL& parent_content_url, 247 virtual void CreateDirectory(const GURL& parent_content_url,
248 const FilePath::StringType& directory_name, 248 const FilePath::StringType& directory_name,
249 const GetDataCallback& callback) OVERRIDE; 249 const GetDataCallback& callback) OVERRIDE;
250 virtual void InitiateUpload(const InitiateUploadParams& params, 250 virtual void InitiateUpload(const InitiateUploadParams& params,
251 const InitiateUploadCallback& callback) OVERRIDE; 251 const InitiateUploadCallback& callback) OVERRIDE;
252 virtual void ResumeUpload(const ResumeUploadParams& params, 252 virtual void ResumeUpload(const ResumeUploadParams& params,
253 const ResumeUploadCallback& callback) OVERRIDE; 253 const ResumeUploadCallback& callback) OVERRIDE;
254 virtual void AuthorizeApp(const GURL& resource_url, 254 virtual void AuthorizeApp(const GURL& resource_url,
255 const std::string& app_id, 255 const std::string& app_id,
256 const GetDataCallback& callback) OVERRIDE; 256 const GetDataCallback& callback) OVERRIDE;
257 virtual bool IsFullyAuthenticated() const OVERRIDE; 257 virtual bool HasAccessToken() const OVERRIDE;
258 virtual bool IsPartiallyAuthenticated() const OVERRIDE; 258 virtual bool HasRefreshToken() const OVERRIDE;
259 259
260 private: 260 private:
261 Profile* profile_; 261 Profile* profile_;
262 262
263 scoped_ptr<GDataOperationRunner> runner_; 263 scoped_ptr<GDataOperationRunner> runner_;
264 264
265 DISALLOW_COPY_AND_ASSIGN(DocumentsService); 265 DISALLOW_COPY_AND_ASSIGN(DocumentsService);
266 }; 266 };
267 267
268 } // namespace gdata 268 } // namespace gdata
269 269
270 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_ 270 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_DOCUMENTS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_auth_service.cc ('k') | chrome/browser/chromeos/gdata/gdata_documents_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698