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

Unified Diff: chrome/browser/google_apis/base_operations.h

Issue 11571002: google_apis: Change protected data members to private (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | chrome/browser/google_apis/base_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698