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

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

Issue 381073002: Move sqlite_channel_id_store from chrome/browser/net to net/extras. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move quota_policy_channel_id_store from content/browser/net to chrome/browser/net. Created 6 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 unified diff | Download patch
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/prefs/pref_member.h" 11 #include "base/prefs/pref_member.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/threading/sequenced_worker_pool.h" 16 #include "base/threading/sequenced_worker_pool.h"
17 #include "base/threading/worker_pool.h" 17 #include "base/threading/worker_pool.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/chromeos/profiles/profile_helper.h" 19 #include "chrome/browser/chromeos/profiles/profile_helper.h"
20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 20 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
21 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 21 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
22 #include "chrome/browser/io_thread.h" 22 #include "chrome/browser/io_thread.h"
23 #include "chrome/browser/net/chrome_net_log.h" 23 #include "chrome/browser/net/chrome_net_log.h"
24 #include "chrome/browser/net/chrome_network_delegate.h" 24 #include "chrome/browser/net/chrome_network_delegate.h"
25 #include "chrome/browser/net/connect_interceptor.h" 25 #include "chrome/browser/net/connect_interceptor.h"
26 #include "chrome/browser/net/cookie_store_util.h" 26 #include "chrome/browser/net/cookie_store_util.h"
27 #include "chrome/browser/net/http_server_properties_manager_factory.h" 27 #include "chrome/browser/net/http_server_properties_manager_factory.h"
28 #include "chrome/browser/net/predictor.h" 28 #include "chrome/browser/net/predictor.h"
29 #include "chrome/browser/net/sqlite_channel_id_store.h" 29 #include "chrome/browser/net/quota_policy_channel_id_store.h"
30 #include "chrome/browser/profiles/profile.h" 30 #include "chrome/browser/profiles/profile.h"
31 #include "chrome/common/chrome_constants.h" 31 #include "chrome/common/chrome_constants.h"
32 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
33 #include "chrome/common/pref_names.h" 33 #include "chrome/common/pref_names.h"
34 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
35 #include "components/domain_reliability/monitor.h" 35 #include "components/domain_reliability/monitor.h"
36 #include "content/public/browser/browser_thread.h" 36 #include "content/public/browser/browser_thread.h"
37 #include "content/public/browser/cookie_store_factory.h" 37 #include "content/public/browser/cookie_store_factory.h"
38 #include "content/public/browser/notification_service.h" 38 #include "content/public/browser/notification_service.h"
39 #include "content/public/browser/resource_context.h" 39 #include "content/public/browser/resource_context.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 chrome_browser_net::GetCookieCryptoDelegate(); 499 chrome_browser_net::GetCookieCryptoDelegate();
500 cookie_store = content::CreateCookieStore(cookie_config); 500 cookie_store = content::CreateCookieStore(cookie_config);
501 } 501 }
502 502
503 main_context->set_cookie_store(cookie_store.get()); 503 main_context->set_cookie_store(cookie_store.get());
504 504
505 // Setup server bound cert service. 505 // Setup server bound cert service.
506 if (!channel_id_service) { 506 if (!channel_id_service) {
507 DCHECK(!lazy_params_->channel_id_path.empty()); 507 DCHECK(!lazy_params_->channel_id_path.empty());
508 508
509 scoped_refptr<SQLiteChannelIDStore> channel_id_db = 509 scoped_refptr<QuotaPolicyChannelIDStore> channel_id_db =
510 new SQLiteChannelIDStore( 510 new QuotaPolicyChannelIDStore(
511 lazy_params_->channel_id_path, 511 lazy_params_->channel_id_path,
512 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( 512 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner(
513 BrowserThread::GetBlockingPool()->GetSequenceToken()), 513 BrowserThread::GetBlockingPool()->GetSequenceToken()),
514 lazy_params_->special_storage_policy.get()); 514 lazy_params_->special_storage_policy.get());
515 channel_id_service = new net::ChannelIDService( 515 channel_id_service = new net::ChannelIDService(
516 new net::DefaultChannelIDStore(channel_id_db.get()), 516 new net::DefaultChannelIDStore(channel_id_db.get()),
517 base::WorkerPool::GetTaskRunner(true)); 517 base::WorkerPool::GetTaskRunner(true));
518 } 518 }
519 519
520 set_channel_id_service(channel_id_service); 520 set_channel_id_service(channel_id_service);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 const base::Closure& completion) { 817 const base::Closure& completion) {
818 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 818 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
819 DCHECK(initialized()); 819 DCHECK(initialized());
820 820
821 DCHECK(transport_security_state()); 821 DCHECK(transport_security_state());
822 // Completes synchronously. 822 // Completes synchronously.
823 transport_security_state()->DeleteAllDynamicDataSince(time); 823 transport_security_state()->DeleteAllDynamicDataSince(time);
824 DCHECK(http_server_properties_manager_); 824 DCHECK(http_server_properties_manager_);
825 http_server_properties_manager_->Clear(completion); 825 http_server_properties_manager_->Clear(completion);
826 } 826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698