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

Unified Diff: chrome/common/net/test_url_fetcher_factory.h

Issue 3176028: Use ChromeThread::IO instead of virtual set_request_context (Closed)
Patch Set: Created 10 years, 4 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/common/net/test_url_fetcher_factory.h
diff --git a/chrome/common/net/test_url_fetcher_factory.h b/chrome/common/net/test_url_fetcher_factory.h
index 676cfe09e8b71a3addfa69672bf0619937abf1b5..b34c0a11a227d222975635899e55e9773e3f23a1 100644
--- a/chrome/common/net/test_url_fetcher_factory.h
+++ b/chrome/common/net/test_url_fetcher_factory.h
@@ -21,6 +21,8 @@
// Typical usage:
// // TestURLFetcher requires a MessageLoop:
// MessageLoopForUI message_loop;
+// // And io_thread to release URLRequestContextGetter in URLFetcher::Core.
+// ChromeThread io_thread(ChromeThread::IO, &message_loop);
// // Create and register factory.
// TestURLFetcherFactory factory;
// URLFetcher::set_factory(&factory);
@@ -53,13 +55,6 @@ class TestURLFetcher : public URLFetcher {
// Returns the data uploaded on this URLFetcher.
const std::string& upload_data() const { return URLFetcher::upload_data(); }
- // Overriden to do nothing. URLFetcher implementation add reference
- // to request_context_getter in core_, but it might not be released
- // because we wouldn't call Core::CancelURLRequest.
- // Without this, we'll see leaks of URLRequestContext in test.
- virtual void set_request_context(
- URLRequestContextGetter* request_context_getter) {}
-
private:
const GURL original_url_;

Powered by Google App Engine
This is Rietveld 408576698