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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 1634653003: Abstract pref storage from net::SdchOwner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@net_prefs
Patch Set: Fix iOS Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/net/sdch_owner_pref_storage.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/chrome_notification_types.h" 29 #include "chrome/browser/chrome_notification_types.h"
30 #include "chrome/browser/chromeos/profiles/profile_helper.h" 30 #include "chrome/browser/chromeos/profiles/profile_helper.h"
31 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 31 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
32 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 32 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
33 #include "chrome/browser/io_thread.h" 33 #include "chrome/browser/io_thread.h"
34 #include "chrome/browser/net/chrome_network_delegate.h" 34 #include "chrome/browser/net/chrome_network_delegate.h"
35 #include "chrome/browser/net/connect_interceptor.h" 35 #include "chrome/browser/net/connect_interceptor.h"
36 #include "chrome/browser/net/http_server_properties_manager_factory.h" 36 #include "chrome/browser/net/http_server_properties_manager_factory.h"
37 #include "chrome/browser/net/predictor.h" 37 #include "chrome/browser/net/predictor.h"
38 #include "chrome/browser/net/quota_policy_channel_id_store.h" 38 #include "chrome/browser/net/quota_policy_channel_id_store.h"
39 #include "chrome/browser/net/sdch_owner_pref_storage.h"
39 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" 40 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h"
40 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 41 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
41 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 42 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
42 #include "chrome/browser/profiles/profile.h" 43 #include "chrome/browser/profiles/profile.h"
43 #include "chrome/common/chrome_constants.h" 44 #include "chrome/common/chrome_constants.h"
44 #include "chrome/common/chrome_switches.h" 45 #include "chrome/common/chrome_switches.h"
45 #include "chrome/common/pref_names.h" 46 #include "chrome/common/pref_names.h"
46 #include "chrome/common/url_constants.h" 47 #include "chrome/common/url_constants.h"
47 #include "components/cookie_config/cookie_store_util.h" 48 #include "components/cookie_config/cookie_store_util.h"
48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h" 49 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 io_thread_globals->network_quality_estimator.get()); 554 io_thread_globals->network_quality_estimator.get());
554 555
555 #if defined(ENABLE_EXTENSIONS) 556 #if defined(ENABLE_EXTENSIONS)
556 InitializeExtensionsRequestContext(profile_params); 557 InitializeExtensionsRequestContext(profile_params);
557 #endif 558 #endif
558 559
559 // Setup SDCH for this profile. 560 // Setup SDCH for this profile.
560 sdch_manager_.reset(new net::SdchManager); 561 sdch_manager_.reset(new net::SdchManager);
561 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context)); 562 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context));
562 main_context->set_sdch_manager(sdch_manager_.get()); 563 main_context->set_sdch_manager(sdch_manager_.get());
563 sdch_policy_->EnablePersistentStorage(network_json_store_.get()); 564 sdch_policy_->EnablePersistentStorage(scoped_ptr<net::SdchOwner::PrefStorage>(
565 new chrome_browser_net::SdchOwnerPrefStorage(network_json_store_.get())));
564 566
565 // Create a media request context based on the main context, but using a 567 // Create a media request context based on the main context, but using a
566 // media cache. It shares the same job factory as the main context. 568 // media cache. It shares the same job factory as the main context.
567 StoragePartitionDescriptor details(profile_path_, false); 569 StoragePartitionDescriptor details(profile_path_, false);
568 media_request_context_.reset(InitializeMediaRequestContext(main_context, 570 media_request_context_.reset(InitializeMediaRequestContext(main_context,
569 details)); 571 details));
570 572
571 lazy_params_.reset(); 573 lazy_params_.reset();
572 } 574 }
573 575
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 const base::Closure& completion) { 776 const base::Closure& completion) {
775 DCHECK_CURRENTLY_ON(BrowserThread::IO); 777 DCHECK_CURRENTLY_ON(BrowserThread::IO);
776 DCHECK(initialized()); 778 DCHECK(initialized());
777 779
778 DCHECK(transport_security_state()); 780 DCHECK(transport_security_state());
779 // Completes synchronously. 781 // Completes synchronously.
780 transport_security_state()->DeleteAllDynamicDataSince(time); 782 transport_security_state()->DeleteAllDynamicDataSince(time);
781 DCHECK(http_server_properties_manager_); 783 DCHECK(http_server_properties_manager_);
782 http_server_properties_manager_->Clear(completion); 784 http_server_properties_manager_->Clear(completion);
783 } 785 }
OLDNEW
« no previous file with comments | « chrome/browser/net/sdch_owner_pref_storage.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698