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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 #if defined(OS_WIN) | 211 #if defined(OS_WIN) |
212 #include "base/strings/string_tokenizer.h" | 212 #include "base/strings/string_tokenizer.h" |
213 #include "chrome/browser/chrome_browser_main_win.h" | 213 #include "chrome/browser/chrome_browser_main_win.h" |
214 #include "chrome/browser/conflicts/module_database_win.h" | 214 #include "chrome/browser/conflicts/module_database_win.h" |
215 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" | 215 #include "chrome/browser/conflicts/module_event_sink_impl_win.h" |
216 #include "sandbox/win/src/sandbox_policy.h" | 216 #include "sandbox/win/src/sandbox_policy.h" |
217 #elif defined(OS_MACOSX) | 217 #elif defined(OS_MACOSX) |
218 #include "chrome/browser/chrome_browser_main_mac.h" | 218 #include "chrome/browser/chrome_browser_main_mac.h" |
219 #elif defined(OS_CHROMEOS) | 219 #elif defined(OS_CHROMEOS) |
220 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 220 #include "chrome/browser/chromeos/arc/arc_util.h" |
221 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" | 221 #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_de
legate.h" |
222 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_del
egate.h" | 222 #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_del
egate.h" |
223 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" | 223 #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" |
224 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" | 224 #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" |
225 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" | 225 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
226 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" | 226 #include "chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h" |
227 #include "chrome/browser/chromeos/file_manager/app_id.h" | 227 #include "chrome/browser/chromeos/file_manager/app_id.h" |
228 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" | 228 #include "chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.
h" |
229 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" | 229 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
230 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" | 230 #include "chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h" |
(...skipping 3144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3375 if (handle->IsInMainFrame()) { | 3375 if (handle->IsInMainFrame()) { |
3376 // Add interstitial page while merge session process (cookie reconstruction | 3376 // Add interstitial page while merge session process (cookie reconstruction |
3377 // from OAuth2 refresh token in ChromeOS login) is still in progress while | 3377 // from OAuth2 refresh token in ChromeOS login) is still in progress while |
3378 // we are attempting to load a google property. | 3378 // we are attempting to load a google property. |
3379 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && | 3379 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && |
3380 !merge_session_throttling_utils::AreAllSessionMergedAlready() && | 3380 !merge_session_throttling_utils::AreAllSessionMergedAlready() && |
3381 handle->GetURL().SchemeIsHTTPOrHTTPS()) { | 3381 handle->GetURL().SchemeIsHTTPOrHTTPS()) { |
3382 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); | 3382 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); |
3383 } | 3383 } |
3384 | 3384 |
3385 const arc::ArcSessionManager* arc_session_manager = | 3385 if (arc::IsArcPlayStoreEnabledForProfile(Profile::FromBrowserContext( |
3386 arc::ArcSessionManager::Get(); | 3386 handle->GetWebContents()->GetBrowserContext())) && |
3387 if (arc_session_manager && arc_session_manager->IsArcPlayStoreEnabled() && | |
3388 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { | 3387 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { |
3389 prerender::PrerenderContents* prerender_contents = | 3388 prerender::PrerenderContents* prerender_contents = |
3390 prerender::PrerenderContents::FromWebContents( | 3389 prerender::PrerenderContents::FromWebContents( |
3391 handle->GetWebContents()); | 3390 handle->GetWebContents()); |
3392 if (!prerender_contents) { | 3391 if (!prerender_contents) { |
3393 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); | 3392 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); |
3394 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( | 3393 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( |
3395 handle, intent_picker_cb); | 3394 handle, intent_picker_cb); |
3396 throttles.push_back(std::move(url_to_arc_throttle)); | 3395 throttles.push_back(std::move(url_to_arc_throttle)); |
3397 } | 3396 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3541 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3540 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3542 return variations::GetVariationParamValue( | 3541 return variations::GetVariationParamValue( |
3543 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3542 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3544 } | 3543 } |
3545 | 3544 |
3546 // static | 3545 // static |
3547 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3546 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3548 const storage::QuotaSettings* settings) { | 3547 const storage::QuotaSettings* settings) { |
3549 g_default_quota_settings = settings; | 3548 g_default_quota_settings = settings; |
3550 } | 3549 } |
OLD | NEW |