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

Unified Diff: chrome/browser/extensions/extension_updater.cc

Issue 6904057: Schetch changes required to support URLFetcher saving response to a file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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
Index: chrome/browser/extensions/extension_updater.cc
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index ff17effcc66251161acac5dfc47bc37d6dca1d0d..924398dabffc79cebe337eeed2a012c499e96287 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -610,6 +610,32 @@ void ExtensionUpdater::OnURLFetchComplete(
NotifyIfFinished();
}
+void ExtensionUpdater::OnURLFetchCompleteNew(
+ const URLFetcher* source,
+ const GURL& url,
+ const net::URLRequestStatus& status,
+ int response_code,
+ const ResponseCookies& cookies,
+ const URLFetcher::ResponseBodyContainerInterface& response_body) {
+
+ LOG(ERROR) << "================== GOTCHA ===================";
+ LOG(ERROR) << " url = "<< url.possibly_invalid_spec();
+
+ // TODO(skerner): Make a Response body class that writes directly to a file, and
+ // avoids use of a string.
+ std::string response_data;
+ CHECK(response_body.GetAsString(&response_data));
+
+ OnURLFetchComplete(
+ source, url, status, response_code, cookies, response_data);
+}
+
+URLFetcher::ResponseBodyContainerInterface*
+ ExtensionUpdater::CreateResponseBodyContainer() {
+ // TODO(skerner): Return a class that writes response bytes to a file.
+ return URLFetcher::Delegate::CreateResponseBodyContainer();
+}
+
// Utility class to handle doing xml parsing in a sandboxed utility process.
class SafeManifestParser : public UtilityProcessHost::Client {
public:

Powered by Google App Engine
This is Rietveld 408576698