Chromium Code Reviews| 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 <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 #include "chrome/browser/speech/tts_message_filter.h" | 70 #include "chrome/browser/speech/tts_message_filter.h" |
| 71 #include "chrome/browser/ssl/ssl_add_certificate.h" | 71 #include "chrome/browser/ssl/ssl_add_certificate.h" |
| 72 #include "chrome/browser/ssl/ssl_blocking_page.h" | 72 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 73 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" | 73 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" |
| 74 #include "chrome/browser/ssl/ssl_error_handler.h" | 74 #include "chrome/browser/ssl/ssl_error_handler.h" |
| 75 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" | 75 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" |
| 76 #include "chrome/browser/tab_contents/tab_util.h" | 76 #include "chrome/browser/tab_contents/tab_util.h" |
| 77 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" | 77 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
| 78 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 78 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 79 #include "chrome/browser/ui/chrome_select_file_policy.h" | 79 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 80 #include "chrome/browser/ui/search/new_tab_page_interceptor_service.h" | |
| 81 #include "chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h" | |
| 80 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 82 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 81 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 83 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 82 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 84 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 83 #include "chrome/common/chrome_constants.h" | 85 #include "chrome/common/chrome_constants.h" |
| 84 #include "chrome/common/chrome_paths.h" | 86 #include "chrome/common/chrome_paths.h" |
| 85 #include "chrome/common/chrome_switches.h" | 87 #include "chrome/common/chrome_switches.h" |
| 86 #include "chrome/common/env_vars.h" | 88 #include "chrome/common/env_vars.h" |
| 87 #include "chrome/common/logging_chrome.h" | 89 #include "chrome/common/logging_chrome.h" |
| 88 #include "chrome/common/pepper_permission_util.h" | 90 #include "chrome/common/pepper_permission_util.h" |
| 89 #include "chrome/common/pref_names.h" | 91 #include "chrome/common/pref_names.h" |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 974 hosts->push_back(chrome::kChromeUIThumbnailHost2); | 976 hosts->push_back(chrome::kChromeUIThumbnailHost2); |
| 975 hosts->push_back(chrome::kChromeUIThumbnailListHost); | 977 hosts->push_back(chrome::kChromeUIThumbnailListHost); |
| 976 } | 978 } |
| 977 | 979 |
| 978 net::URLRequestContextGetter* | 980 net::URLRequestContextGetter* |
| 979 ChromeContentBrowserClient::CreateRequestContext( | 981 ChromeContentBrowserClient::CreateRequestContext( |
| 980 content::BrowserContext* browser_context, | 982 content::BrowserContext* browser_context, |
| 981 content::ProtocolHandlerMap* protocol_handlers, | 983 content::ProtocolHandlerMap* protocol_handlers, |
| 982 content::URLRequestInterceptorScopedVector request_interceptors) { | 984 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 983 Profile* profile = Profile::FromBrowserContext(browser_context); | 985 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 986 NewTabPageInterceptorService* service = | |
| 987 NewTabPageInterceptorServiceFactory::GetForProfile(profile); | |
| 988 if (service) | |
| 989 request_interceptors.push_back(service->CreateInterceptor().release()); | |
|
mmenke
2015/01/16 22:04:16
Should we really make one of these for incognito?
Mathieu
2015/01/22 19:21:58
Are you saying we should? Currently we are not cre
kmadhusu
2015/01/22 20:06:30
Incognito mode doesn't use an online ntp. We don't
mmenke
2015/01/22 20:53:50
Right...I missed the face that in NewTabPageInterc
| |
| 984 return profile->CreateRequestContext(protocol_handlers, | 990 return profile->CreateRequestContext(protocol_handlers, |
| 985 request_interceptors.Pass()); | 991 request_interceptors.Pass()); |
| 986 } | 992 } |
| 987 | 993 |
| 988 net::URLRequestContextGetter* | 994 net::URLRequestContextGetter* |
| 989 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( | 995 ChromeContentBrowserClient::CreateRequestContextForStoragePartition( |
| 990 content::BrowserContext* browser_context, | 996 content::BrowserContext* browser_context, |
| 991 const base::FilePath& partition_path, | 997 const base::FilePath& partition_path, |
| 992 bool in_memory, | 998 bool in_memory, |
| 993 content::ProtocolHandlerMap* protocol_handlers, | 999 content::ProtocolHandlerMap* protocol_handlers, |
| (...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2628 switches::kDisableWebRtcEncryption, | 2634 switches::kDisableWebRtcEncryption, |
| 2629 }; | 2635 }; |
| 2630 to_command_line->CopySwitchesFrom(from_command_line, | 2636 to_command_line->CopySwitchesFrom(from_command_line, |
| 2631 kWebRtcDevSwitchNames, | 2637 kWebRtcDevSwitchNames, |
| 2632 arraysize(kWebRtcDevSwitchNames)); | 2638 arraysize(kWebRtcDevSwitchNames)); |
| 2633 } | 2639 } |
| 2634 } | 2640 } |
| 2635 #endif // defined(ENABLE_WEBRTC) | 2641 #endif // defined(ENABLE_WEBRTC) |
| 2636 | 2642 |
| 2637 } // namespace chrome | 2643 } // namespace chrome |
| OLD | NEW |