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

Unified Diff: google_apis/drive/base_requests.h

Issue 127613002: google_apis: Stop accessing URLFetcher from ResponseWriter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | google_apis/drive/base_requests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/base_requests.h
diff --git a/google_apis/drive/base_requests.h b/google_apis/drive/base_requests.h
index e3aee9046c23b578373b5b0f2bb20c40d866e731..afe12a04fbef7ee5dac09b43bb35c136d16f8323 100644
--- a/google_apis/drive/base_requests.h
+++ b/google_apis/drive/base_requests.h
@@ -94,8 +94,7 @@ class ResponseWriter : public net::URLFetcherResponseWriter {
public:
// If file_path is not empty, the response will be saved with file_writer_,
// otherwise it will be saved to data_.
- ResponseWriter(net::URLFetcher* url_fetcher,
- base::SequencedTaskRunner* file_task_runner,
+ ResponseWriter(base::SequencedTaskRunner* file_task_runner,
const base::FilePath& file_path,
const GetContentCallback& get_content_callback);
virtual ~ResponseWriter();
@@ -113,10 +112,14 @@ class ResponseWriter : public net::URLFetcherResponseWriter {
virtual int Finish(const net::CompletionCallback& callback) OVERRIDE;
private:
- net::URLFetcher* url_fetcher_;
+ void DidWrite(scoped_refptr<net::IOBuffer> buffer,
+ const net::CompletionCallback& callback,
+ int result);
+
const GetContentCallback get_content_callback_;
std::string data_;
scoped_ptr<net::URLFetcherFileWriter> file_writer_;
+ base::WeakPtrFactory<ResponseWriter> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ResponseWriter);
};
« no previous file with comments | « no previous file | google_apis/drive/base_requests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698