| 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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include <string> | 9 #include <string> |
| 8 | 10 |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/bind.h" | 11 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 12 #include "base/callback.h" | 13 #include "base/callback.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 15 #include "base/debug/alias.h" | 16 #include "base/debug/alias.h" |
| 16 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/macros.h" |
| 17 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 18 #include "base/prefs/pref_service.h" | 20 #include "base/prefs/pref_service.h" |
| 19 #include "base/stl_util.h" | 21 #include "base/stl_util.h" |
| 20 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
| 21 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
| 22 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
| 23 #include "base/thread_task_runner_handle.h" | 25 #include "base/thread_task_runner_handle.h" |
| 24 #include "base/threading/sequenced_worker_pool.h" | 26 #include "base/threading/sequenced_worker_pool.h" |
| 27 #include "build/build_config.h" |
| 25 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/browser/chrome_notification_types.h" | 29 #include "chrome/browser/chrome_notification_types.h" |
| 27 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 30 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 28 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 31 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 29 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 32 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 30 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 33 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| 31 #include "chrome/browser/devtools/devtools_network_controller.h" | 34 #include "chrome/browser/devtools/devtools_network_controller.h" |
| 32 #include "chrome/browser/devtools/devtools_network_transaction_factory.h" | 35 #include "chrome/browser/devtools/devtools_network_transaction_factory.h" |
| 33 #include "chrome/browser/download/download_service.h" | 36 #include "chrome/browser/download/download_service.h" |
| 34 #include "chrome/browser/download/download_service_factory.h" | 37 #include "chrome/browser/download/download_service_factory.h" |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 // Android does not use the ClientCertStore infrastructure. On Android client | 960 // Android does not use the ClientCertStore infrastructure. On Android client |
| 958 // cert matching is done by the OS as part of the call to show the cert | 961 // cert matching is done by the OS as part of the call to show the cert |
| 959 // selection dialog. | 962 // selection dialog. |
| 960 return nullptr; | 963 return nullptr; |
| 961 #else | 964 #else |
| 962 #error Unknown platform. | 965 #error Unknown platform. |
| 963 #endif | 966 #endif |
| 964 } | 967 } |
| 965 | 968 |
| 966 void ProfileIOData::ResourceContext::CreateKeygenHandler( | 969 void ProfileIOData::ResourceContext::CreateKeygenHandler( |
| 967 uint32 key_size_in_bits, | 970 uint32_t key_size_in_bits, |
| 968 const std::string& challenge_string, | 971 const std::string& challenge_string, |
| 969 const GURL& url, | 972 const GURL& url, |
| 970 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) { | 973 const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) { |
| 971 DCHECK(!callback.is_null()); | 974 DCHECK(!callback.is_null()); |
| 972 #if defined(USE_NSS_CERTS) | 975 #if defined(USE_NSS_CERTS) |
| 973 scoped_ptr<net::KeygenHandler> keygen_handler( | 976 scoped_ptr<net::KeygenHandler> keygen_handler( |
| 974 new net::KeygenHandler(key_size_in_bits, challenge_string, url)); | 977 new net::KeygenHandler(key_size_in_bits, challenge_string, url)); |
| 975 | 978 |
| 976 base::Callback<void(scoped_ptr<ChromeNSSCryptoModuleDelegate>)> | 979 base::Callback<void(scoped_ptr<ChromeNSSCryptoModuleDelegate>)> |
| 977 got_delegate_callback = base::Bind(&InitializeAndPassKeygenHandler, | 980 got_delegate_callback = base::Bind(&InitializeAndPassKeygenHandler, |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 make_scoped_ptr(new DevToolsNetworkTransactionFactory( | 1324 make_scoped_ptr(new DevToolsNetworkTransactionFactory( |
| 1322 network_controller_handle_.GetController(), shared_session)), | 1325 network_controller_handle_.GetController(), shared_session)), |
| 1323 backend.Pass(), true /* set_up_quic_server_info */)); | 1326 backend.Pass(), true /* set_up_quic_server_info */)); |
| 1324 } | 1327 } |
| 1325 | 1328 |
| 1326 void ProfileIOData::SetCookieSettingsForTesting( | 1329 void ProfileIOData::SetCookieSettingsForTesting( |
| 1327 content_settings::CookieSettings* cookie_settings) { | 1330 content_settings::CookieSettings* cookie_settings) { |
| 1328 DCHECK(!cookie_settings_.get()); | 1331 DCHECK(!cookie_settings_.get()); |
| 1329 cookie_settings_ = cookie_settings; | 1332 cookie_settings_ = cookie_settings; |
| 1330 } | 1333 } |
| OLD | NEW |