OLD | NEW |
---|---|
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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/prefs/public/pref_member.h" | 12 #include "base/prefs/public/pref_member.h" |
13 #include "base/sequenced_task_runner.h" | |
13 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/threading/sequenced_worker_pool.h" | |
14 #include "base/threading/worker_pool.h" | 16 #include "base/threading/worker_pool.h" |
15 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 17 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
16 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 18 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
17 #include "chrome/browser/io_thread.h" | 19 #include "chrome/browser/io_thread.h" |
18 #include "chrome/browser/net/chrome_net_log.h" | 20 #include "chrome/browser/net/chrome_net_log.h" |
19 #include "chrome/browser/net/chrome_network_delegate.h" | 21 #include "chrome/browser/net/chrome_network_delegate.h" |
20 #include "chrome/browser/net/clear_on_exit_policy.h" | 22 #include "chrome/browser/net/clear_on_exit_policy.h" |
21 #include "chrome/browser/net/connect_interceptor.h" | 23 #include "chrome/browser/net/connect_interceptor.h" |
22 #include "chrome/browser/net/http_server_properties_manager.h" | 24 #include "chrome/browser/net/http_server_properties_manager.h" |
23 #include "chrome/browser/net/predictor.h" | 25 #include "chrome/browser/net/predictor.h" |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
592 } | 594 } |
593 | 595 |
594 // Use an app-specific cookie store. | 596 // Use an app-specific cookie store. |
595 if (!cookie_store) { | 597 if (!cookie_store) { |
596 DCHECK(!cookie_path.empty()); | 598 DCHECK(!cookie_path.empty()); |
597 | 599 |
598 scoped_refptr<SQLitePersistentCookieStore> cookie_db = | 600 scoped_refptr<SQLitePersistentCookieStore> cookie_db = |
599 new SQLitePersistentCookieStore( | 601 new SQLitePersistentCookieStore( |
600 cookie_path, | 602 cookie_path, |
601 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 603 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
602 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), | 604 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
605 BrowserThread::GetBlockingPool()->GetSequenceToken()), | |
mmenke
2013/02/26 21:01:18
Not the main request context?
erikwright (departed)
2013/02/26 23:23:05
Oops :(
| |
603 false, | 606 false, |
604 NULL); | 607 NULL); |
605 // TODO(creis): We should have a cookie delegate for notifying the cookie | 608 // TODO(creis): We should have a cookie delegate for notifying the cookie |
606 // extensions API, but we need to update it to understand isolated apps | 609 // extensions API, but we need to update it to understand isolated apps |
607 // first. | 610 // first. |
608 cookie_store = new net::CookieMonster(cookie_db.get(), NULL); | 611 cookie_store = new net::CookieMonster(cookie_db.get(), NULL); |
609 } | 612 } |
610 | 613 |
611 // Transfer ownership of the cookies and cache to AppRequestContext. | 614 // Transfer ownership of the cookies and cache to AppRequestContext. |
612 context->SetCookieStore(cookie_store); | 615 context->SetCookieStore(cookie_store); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
752 base::Time time, | 755 base::Time time, |
753 const base::Closure& completion) { | 756 const base::Closure& completion) { |
754 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 757 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
755 DCHECK(initialized()); | 758 DCHECK(initialized()); |
756 | 759 |
757 DCHECK(transport_security_state()); | 760 DCHECK(transport_security_state()); |
758 transport_security_state()->DeleteSince(time); // Completes synchronously. | 761 transport_security_state()->DeleteSince(time); // Completes synchronously. |
759 DCHECK(http_server_properties_manager_); | 762 DCHECK(http_server_properties_manager_); |
760 http_server_properties_manager_->Clear(completion); | 763 http_server_properties_manager_->Clear(completion); |
761 } | 764 } |
OLD | NEW |