| 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_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 virtual void OnAuthFailed(GDataErrorCode code) OVERRIDE; | 131 virtual void OnAuthFailed(GDataErrorCode code) OVERRIDE; |
| 132 | 132 |
| 133 std::string GetResponseHeadersAsString( | 133 std::string GetResponseHeadersAsString( |
| 134 const content::URLFetcher* url_fetcher); | 134 const content::URLFetcher* url_fetcher); |
| 135 | 135 |
| 136 Profile* profile_; | 136 Profile* profile_; |
| 137 ReAuthenticateCallback re_authenticate_callback_; | 137 ReAuthenticateCallback re_authenticate_callback_; |
| 138 scoped_refptr<base::MessageLoopProxy> relay_proxy_; | 138 scoped_refptr<base::MessageLoopProxy> relay_proxy_; |
| 139 int re_authenticate_count_; | 139 int re_authenticate_count_; |
| 140 bool save_temp_file_; | 140 bool save_temp_file_; |
| 141 FilePath output_file_path_; |
| 141 scoped_ptr<content::URLFetcher> url_fetcher_; | 142 scoped_ptr<content::URLFetcher> url_fetcher_; |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 //============================ EntryActionOperation ============================ | 145 //============================ EntryActionOperation ============================ |
| 145 | 146 |
| 146 // This class performs a simple action over a given entry (document/file). | 147 // This class performs a simple action over a given entry (document/file). |
| 147 // It is meant to be used for operations that return no JSON blobs. | 148 // It is meant to be used for operations that return no JSON blobs. |
| 148 class EntryActionOperation : public UrlFetchOperationBase { | 149 class EntryActionOperation : public UrlFetchOperationBase { |
| 149 public: | 150 public: |
| 150 EntryActionOperation(GDataOperationRegistry* registry, | 151 EntryActionOperation(GDataOperationRegistry* registry, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 238 |
| 238 //============================ DownloadFileOperation =========================== | 239 //============================ DownloadFileOperation =========================== |
| 239 | 240 |
| 240 // This class performs the operation for downloading of a given document/file. | 241 // This class performs the operation for downloading of a given document/file. |
| 241 class DownloadFileOperation : public UrlFetchOperationBase { | 242 class DownloadFileOperation : public UrlFetchOperationBase { |
| 242 public: | 243 public: |
| 243 DownloadFileOperation(GDataOperationRegistry* registry, | 244 DownloadFileOperation(GDataOperationRegistry* registry, |
| 244 Profile* profile, | 245 Profile* profile, |
| 245 const DownloadActionCallback& callback, | 246 const DownloadActionCallback& callback, |
| 246 const GURL& document_url, | 247 const GURL& document_url, |
| 247 const FilePath& virtual_path); | 248 const FilePath& virtual_path, |
| 249 const FilePath& output_file_path); |
| 248 virtual ~DownloadFileOperation(); | 250 virtual ~DownloadFileOperation(); |
| 249 | 251 |
| 250 protected: | 252 protected: |
| 251 // Overridden from UrlFetchOperationBase. | 253 // Overridden from UrlFetchOperationBase. |
| 252 virtual GURL GetURL() const OVERRIDE; | 254 virtual GURL GetURL() const OVERRIDE; |
| 253 virtual bool ProcessURLFetchResults(const content::URLFetcher* source) | 255 virtual bool ProcessURLFetchResults(const content::URLFetcher* source) |
| 254 OVERRIDE; | 256 OVERRIDE; |
| 255 virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; | 257 virtual void RunCallbackOnPrematureFailure(GDataErrorCode code) OVERRIDE; |
| 256 | 258 |
| 257 // Overridden from content::URLFetcherDelegate. | 259 // Overridden from content::URLFetcherDelegate. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 private: | 491 private: |
| 490 ResumeUploadCallback callback_; | 492 ResumeUploadCallback callback_; |
| 491 ResumeUploadParams params_; | 493 ResumeUploadParams params_; |
| 492 | 494 |
| 493 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); | 495 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); |
| 494 }; | 496 }; |
| 495 | 497 |
| 496 } // namespace gdata | 498 } // namespace gdata |
| 497 | 499 |
| 498 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ | 500 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_OPERATIONS_H_ |
| OLD | NEW |