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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 298063006: Make SdchManager per-profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove whitespace before asterix. Created 6 years, 6 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/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 25a6ffbdf7e97588f4d0571e1a4d2ee0456cc985..0f1a5f5998c27d4422f94928ddee11497607388b 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/net/cookie_store_util.h"
#include "chrome/browser/net/http_server_properties_manager.h"
#include "chrome/browser/net/predictor.h"
+#include "chrome/browser/net/sdch_dictionary_fetcher.h"
#include "chrome/browser/net/sqlite_server_bound_cert_store.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
@@ -41,6 +42,7 @@
#include "extensions/browser/extension_protocols.h"
#include "extensions/common/constants.h"
#include "net/base/cache_type.h"
+#include "net/base/sdch_manager.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
#include "net/ssl/server_bound_cert_service.h"
@@ -522,6 +524,18 @@ void ProfileImplIOData::InitializeInternal(
InitializeExtensionsRequestContext(profile_params);
#endif
+ // Setup the SDCHManager for this profile.
+ sdch_manager_.reset(new net::SdchManager);
+ sdch_manager_->set_sdch_fetcher(
+ new SdchDictionaryFetcher(
+ sdch_manager_.get(),
+ // SdchDictionaryFetcher takes a reference to the Getter, and
+ // hence implicitly takes ownership.
+ new net::TrivialURLRequestContextGetter(
mmenke 2014/06/12 16:48:31 This makes me sad, but doing something nicer seems
Randy Smith (Not in Mondays) 2014/06/12 18:06:40 I chatted with Will as to whether or not this shou
mmenke 2014/06/12 18:11:16 Actually, I'd be fine with using the real main req
+ main_context,
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::IO))));
mmenke 2014/06/12 16:48:31 Shouldn't you be calling main_context.set_sdch_man
mmenke 2014/06/12 16:48:31 What about the OTR profile? It would end up using
Randy Smith (Not in Mondays) 2014/06/12 18:06:39 Tricky question. I think the answer for this CL i
Randy Smith (Not in Mondays) 2014/06/12 18:06:39 Yikes. Thank you. Yes. (And I won't land withou
+
// Create a media request context based on the main context, but using a
// media cache. It shares the same job factory as the main context.
StoragePartitionDescriptor details(profile_path_, false);

Powered by Google App Engine
This is Rietveld 408576698