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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 1208 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
1209 host->AddFilter(new SpellCheckMessageFilterPlatform(id)); | 1209 host->AddFilter(new SpellCheckMessageFilterPlatform(id)); |
1210 #endif | 1210 #endif |
1211 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); | 1211 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); |
1212 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); | 1212 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); |
1213 #if BUILDFLAG(ENABLE_WEBRTC) | 1213 #if BUILDFLAG(ENABLE_WEBRTC) |
1214 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = | 1214 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = |
1215 new WebRtcLoggingHandlerHost(id, profile, | 1215 new WebRtcLoggingHandlerHost(id, profile, |
1216 g_browser_process->webrtc_log_uploader()); | 1216 g_browser_process->webrtc_log_uploader()); |
1217 host->AddFilter(webrtc_logging_handler_host); | 1217 host->AddFilter(webrtc_logging_handler_host); |
1218 host->SetUserData(WebRtcLoggingHandlerHost::kWebRtcLoggingHandlerHostKey, | 1218 host->SetUserData( |
1219 new base::UserDataAdapter<WebRtcLoggingHandlerHost>( | 1219 WebRtcLoggingHandlerHost::kWebRtcLoggingHandlerHostKey, |
1220 webrtc_logging_handler_host)); | 1220 base::MakeUnique<base::UserDataAdapter<WebRtcLoggingHandlerHost>>( |
| 1221 webrtc_logging_handler_host)); |
1221 | 1222 |
1222 // The audio manager outlives the host, so it's safe to hand a raw pointer to | 1223 // The audio manager outlives the host, so it's safe to hand a raw pointer to |
1223 // it to the AudioDebugRecordingsHandler, which is owned by the host. | 1224 // it to the AudioDebugRecordingsHandler, which is owned by the host. |
1224 AudioDebugRecordingsHandler* audio_debug_recordings_handler = | 1225 AudioDebugRecordingsHandler* audio_debug_recordings_handler = |
1225 new AudioDebugRecordingsHandler(profile, media::AudioManager::Get()); | 1226 new AudioDebugRecordingsHandler(profile, media::AudioManager::Get()); |
1226 host->SetUserData( | 1227 host->SetUserData( |
1227 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, | 1228 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, |
1228 new base::UserDataAdapter<AudioDebugRecordingsHandler>( | 1229 base::MakeUnique<base::UserDataAdapter<AudioDebugRecordingsHandler>>( |
1229 audio_debug_recordings_handler)); | 1230 audio_debug_recordings_handler)); |
1230 | 1231 |
1231 #endif | 1232 #endif |
1232 #if !defined(DISABLE_NACL) | 1233 #if !defined(DISABLE_NACL) |
1233 net::URLRequestContextGetter* context = | 1234 net::URLRequestContextGetter* context = |
1234 host->GetStoragePartition()->GetURLRequestContext(); | 1235 host->GetStoragePartition()->GetURLRequestContext(); |
1235 host->AddFilter(new nacl::NaClHostMessageFilter( | 1236 host->AddFilter(new nacl::NaClHostMessageFilter( |
1236 id, profile->IsOffTheRecord(), | 1237 id, profile->IsOffTheRecord(), |
1237 profile->GetPath(), | 1238 profile->GetPath(), |
1238 context)); | 1239 context)); |
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3615 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3616 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3616 return variations::GetVariationParamValue( | 3617 return variations::GetVariationParamValue( |
3617 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3618 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3618 } | 3619 } |
3619 | 3620 |
3620 // static | 3621 // static |
3621 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3622 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3622 const storage::QuotaSettings* settings) { | 3623 const storage::QuotaSettings* settings) { |
3623 g_default_quota_settings = settings; | 3624 g_default_quota_settings = settings; |
3624 } | 3625 } |
OLD | NEW |