Chromium Code Reviews| 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 cb3f838153fdbe695fede346ef37c195bac46e06..09bb042f8c3eea9c150e6b07806631f206c67738 100644 |
| --- a/chrome/browser/profiles/profile_impl_io_data.cc |
| +++ b/chrome/browser/profiles/profile_impl_io_data.cc |
| @@ -6,55 +6,60 @@ |
| #include <memory> |
| #include <set> |
| #include <string> |
| #include <utility> |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| #include "base/macros.h" |
| +#include "base/memory/ptr_util.h" |
| #include "base/metrics/field_trial.h" |
| #include "base/sequenced_task_runner.h" |
| #include "base/stl_util.h" |
| #include "base/strings/string_util.h" |
| #include "base/threading/sequenced_worker_pool.h" |
| #include "base/threading/worker_pool.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| #include "chrome/browser/io_thread.h" |
| #include "chrome/browser/net/chrome_network_delegate.h" |
| #include "chrome/browser/net/http_server_properties_manager_factory.h" |
| #include "chrome/browser/net/predictor.h" |
| #include "chrome/browser/net/quota_policy_channel_id_store.h" |
| #include "chrome/browser/net/sdch_owner_pref_storage.h" |
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" |
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h" |
| +#include "chrome/browser/previews/previews_service.h" |
| +#include "chrome/browser/previews/previews_service_factory.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/common/chrome_constants.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| #include "chrome/common/url_constants.h" |
| #include "components/cookie_config/cookie_store_util.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h" |
| #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h" |
| #include "components/data_reduction_proxy/core/browser/data_store_impl.h" |
| #include "components/domain_reliability/monitor.h" |
| #include "components/net_log/chrome_net_log.h" |
| #include "components/prefs/json_pref_store.h" |
| #include "components/prefs/pref_filter.h" |
| #include "components/prefs/pref_member.h" |
| #include "components/prefs/pref_service.h" |
| +#include "components/previews/previews_io_data.h" |
| +#include "components/previews/previews_ui_service.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/cookie_store_factory.h" |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/resource_context.h" |
| #include "content/public/browser/storage_partition.h" |
| #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/cookies/cookie_store.h" |
| @@ -193,20 +198,28 @@ void ProfileImplIOData::Handle::Init( |
| pool->GetSequenceToken(), |
| base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
| std::unique_ptr<data_reduction_proxy::DataStore> store( |
| new data_reduction_proxy::DataStoreImpl(profile_path)); |
| DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_) |
| ->InitDataReductionProxySettings( |
| io_data_->data_reduction_proxy_io_data(), profile_->GetPrefs(), |
| profile_->GetRequestContext(), std::move(store), |
| BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| db_task_runner); |
| + |
| + io_data_->set_previews_io_data(base::MakeUnique<previews::PreviewsIOData>( |
| + BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); |
| + PreviewsServiceFactory::GetForProfile(profile_)->set_previews_ui_service( |
| + base::MakeUnique<previews::PreviewsUIService>( |
| + io_data_->previews_io_data(), |
| + BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); |
|
mmenke
2016/09/08 22:40:27
If this is currently an Android-only feature, as t
|
| } |
| content::ResourceContext* |
| ProfileImplIOData::Handle::GetResourceContext() const { |
| DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| LazyInitialize(); |
| return GetResourceContextNoInit(); |
| } |
| content::ResourceContext* |