| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 #include "url/gurl.h" | 197 #include "url/gurl.h" |
| 198 #include "url/origin.h" | 198 #include "url/origin.h" |
| 199 | 199 |
| 200 #if defined(OS_WIN) | 200 #if defined(OS_WIN) |
| 201 #include "base/strings/string_tokenizer.h" | 201 #include "base/strings/string_tokenizer.h" |
| 202 #include "chrome/browser/chrome_browser_main_win.h" | 202 #include "chrome/browser/chrome_browser_main_win.h" |
| 203 #include "sandbox/win/src/sandbox_policy.h" | 203 #include "sandbox/win/src/sandbox_policy.h" |
| 204 #elif defined(OS_MACOSX) | 204 #elif defined(OS_MACOSX) |
| 205 #include "chrome/browser/chrome_browser_main_mac.h" | 205 #include "chrome/browser/chrome_browser_main_mac.h" |
| 206 #elif defined(OS_CHROMEOS) | 206 #elif defined(OS_CHROMEOS) |
| 207 #include "chrome/browser/chromeos/arc/arc_auth_service.h" | 207 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 208 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" | 208 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" |
| 209 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 209 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
| 210 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 210 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
| 211 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 211 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 212 #include "chrome/browser/chromeos/chrome_interface_factory.h" | 212 #include "chrome/browser/chromeos/chrome_interface_factory.h" |
| 213 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 213 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
| 214 #include "chrome/browser/chromeos/file_manager/app_id.h" | 214 #include "chrome/browser/chromeos/file_manager/app_id.h" |
| 215 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | 215 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" |
| 216 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 216 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
| 217 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" | 217 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" |
| (...skipping 2910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 if (handle->IsInMainFrame()) { | 3128 if (handle->IsInMainFrame()) { |
| 3129 // Add interstitial page while merge session process (cookie reconstruction | 3129 // Add interstitial page while merge session process (cookie reconstruction |
| 3130 // from OAuth2 refresh token in ChromeOS login) is still in progress while | 3130 // from OAuth2 refresh token in ChromeOS login) is still in progress while |
| 3131 // we are attempting to load a google property. | 3131 // we are attempting to load a google property. |
| 3132 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && | 3132 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && |
| 3133 !merge_session_throttling_utils::AreAllSessionMergedAlready() && | 3133 !merge_session_throttling_utils::AreAllSessionMergedAlready() && |
| 3134 handle->GetURL().SchemeIsHTTPOrHTTPS()) { | 3134 handle->GetURL().SchemeIsHTTPOrHTTPS()) { |
| 3135 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); | 3135 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); |
| 3136 } | 3136 } |
| 3137 | 3137 |
| 3138 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get(); | 3138 const arc::ArcSessionManager* arc_session_manager = |
| 3139 if (auth_service && auth_service->IsArcEnabled() && | 3139 arc::ArcSessionManager::Get(); |
| 3140 if (arc_session_manager && arc_session_manager->IsArcEnabled() && |
| 3140 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { | 3141 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { |
| 3141 prerender::PrerenderContents* prerender_contents = | 3142 prerender::PrerenderContents* prerender_contents = |
| 3142 prerender::PrerenderContents::FromWebContents( | 3143 prerender::PrerenderContents::FromWebContents( |
| 3143 handle->GetWebContents()); | 3144 handle->GetWebContents()); |
| 3144 if (!prerender_contents) { | 3145 if (!prerender_contents) { |
| 3145 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); | 3146 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); |
| 3146 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( | 3147 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( |
| 3147 handle, intent_picker_cb); | 3148 handle, intent_picker_cb); |
| 3148 throttles.push_back(std::move(url_to_arc_throttle)); | 3149 throttles.push_back(std::move(url_to_arc_throttle)); |
| 3149 } | 3150 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3239 kWebRtcDevSwitchNames, | 3240 kWebRtcDevSwitchNames, |
| 3240 arraysize(kWebRtcDevSwitchNames)); | 3241 arraysize(kWebRtcDevSwitchNames)); |
| 3241 } | 3242 } |
| 3242 } | 3243 } |
| 3243 #endif // defined(ENABLE_WEBRTC) | 3244 #endif // defined(ENABLE_WEBRTC) |
| 3244 | 3245 |
| 3245 std::unique_ptr<content::MemoryCoordinatorDelegate> | 3246 std::unique_ptr<content::MemoryCoordinatorDelegate> |
| 3246 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { | 3247 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { |
| 3247 return memory::ChromeMemoryCoordinatorDelegate::Create(); | 3248 return memory::ChromeMemoryCoordinatorDelegate::Create(); |
| 3248 } | 3249 } |
| OLD | NEW |