Index: chrome/browser/google_apis/base_operations.h |
diff --git a/chrome/browser/google_apis/base_operations.h b/chrome/browser/google_apis/base_operations.h |
index d26f6b9e4ffcbe04dc9f221ea93f28c57d71135e..5d82ce245c9950f4f943e71e1eeed0f1581906de 100644 |
--- a/chrome/browser/google_apis/base_operations.h |
+++ b/chrome/browser/google_apis/base_operations.h |
@@ -137,10 +137,19 @@ class UrlFetchOperationBase : public AuthenticatedOperationInterface, |
// the status of the URLFetcher. |
static GDataErrorCode GetErrorCode(const net::URLFetcher* source); |
- // The following members are used by DownloadFileOperation. |
- // TODO(satorux): Make them private. |
- bool save_temp_file_; |
- FilePath output_file_path_; |
+ // By default, no temporary file will be saved. Derived classes can set |
+ // this to true in their constructors, if they want to save the downloaded |
+ // content to a temporary file. |
+ void set_save_temp_file(bool save_temp_file) { |
+ save_temp_file_ = save_temp_file; |
+ } |
+ |
+ // By default, no file will be saved. Derived classes can set an output |
+ // file path in their constructors, if they want to save the donwloaded |
+ // content to a file at a specific path. |
+ void set_output_file_path(const FilePath& output_file_path) { |
+ output_file_path_ = output_file_path; |
+ } |
private: |
// OperationRegistry::Operation overrides. |
@@ -158,6 +167,9 @@ class UrlFetchOperationBase : public AuthenticatedOperationInterface, |
scoped_ptr<net::URLFetcher> url_fetcher_; |
bool started_; |
+ bool save_temp_file_; |
+ FilePath output_file_path_; |
+ |
// WeakPtrFactory bound to the UI thread. |
// Note: This should remain the last member so it'll be destroyed and |
// invalidate its weak pointers before any other members are destroyed. |