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 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3122 if (handle->IsInMainFrame()) { | 3122 if (handle->IsInMainFrame()) { |
3123 // Add interstitial page while merge session process (cookie reconstruction | 3123 // Add interstitial page while merge session process (cookie reconstruction |
3124 // from OAuth2 refresh token in ChromeOS login) is still in progress while | 3124 // from OAuth2 refresh token in ChromeOS login) is still in progress while |
3125 // we are attempting to load a google property. | 3125 // we are attempting to load a google property. |
3126 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && | 3126 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && |
3127 !merge_session_throttling_utils::AreAllSessionMergedAlready() && | 3127 !merge_session_throttling_utils::AreAllSessionMergedAlready() && |
3128 handle->GetURL().SchemeIsHTTPOrHTTPS()) { | 3128 handle->GetURL().SchemeIsHTTPOrHTTPS()) { |
3129 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); | 3129 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); |
3130 } | 3130 } |
3131 | 3131 |
| 3132 // TODO(djacobo): Support incognito mode by showing an aditional dialog as a |
| 3133 // warning that the selected app is not in incognito mode. |
3132 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get(); | 3134 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get(); |
3133 if (auth_service && auth_service->IsArcEnabled() && | 3135 if (auth_service && auth_service->IsArcEnabled() && |
3134 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { | 3136 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { |
3135 prerender::PrerenderContents* prerender_contents = | 3137 prerender::PrerenderContents* prerender_contents = |
3136 prerender::PrerenderContents::FromWebContents( | 3138 prerender::PrerenderContents::FromWebContents( |
3137 handle->GetWebContents()); | 3139 handle->GetWebContents()); |
3138 if (!prerender_contents) { | 3140 if (!prerender_contents) { |
3139 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); | 3141 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); |
3140 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( | 3142 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( |
3141 handle, intent_picker_cb); | 3143 handle, intent_picker_cb); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3247 kWebRtcDevSwitchNames, | 3249 kWebRtcDevSwitchNames, |
3248 arraysize(kWebRtcDevSwitchNames)); | 3250 arraysize(kWebRtcDevSwitchNames)); |
3249 } | 3251 } |
3250 } | 3252 } |
3251 #endif // defined(ENABLE_WEBRTC) | 3253 #endif // defined(ENABLE_WEBRTC) |
3252 | 3254 |
3253 std::unique_ptr<content::MemoryCoordinatorDelegate> | 3255 std::unique_ptr<content::MemoryCoordinatorDelegate> |
3254 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { | 3256 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { |
3255 return memory::ChromeMemoryCoordinatorDelegate::Create(); | 3257 return memory::ChromeMemoryCoordinatorDelegate::Create(); |
3256 } | 3258 } |
OLD | NEW |