Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2194523002: [arc-intents] Handle redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after
2931 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() && 2931 if (merge_session_throttling_utils::ShouldAttachNavigationThrottle() &&
2932 !merge_session_throttling_utils::AreAllSessionMergedAlready() && 2932 !merge_session_throttling_utils::AreAllSessionMergedAlready() &&
2933 handle->GetURL().SchemeIsHTTPOrHTTPS()) { 2933 handle->GetURL().SchemeIsHTTPOrHTTPS()) {
2934 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); 2934 throttles.push_back(MergeSessionNavigationThrottle::Create(handle));
2935 } 2935 }
2936 2936
2937 // TODO(djacobo): Support incognito mode by showing an aditional dialog as a 2937 // TODO(djacobo): Support incognito mode by showing an aditional dialog as a
2938 // warning that the selected app is not in incognito mode. 2938 // warning that the selected app is not in incognito mode.
2939 if (IsIntentPickerEnabled() && 2939 if (IsIntentPickerEnabled() &&
2940 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) { 2940 !handle->GetWebContents()->GetBrowserContext()->IsOffTheRecord()) {
2941 arc::ArcServiceManager* arc_service_manager = 2941 prerender::PrerenderContents* prerender_contents =
2942 arc::ArcServiceManager::Get(); 2942 prerender::PrerenderContents::FromWebContents(
2943 DCHECK(arc_service_manager); 2943 handle->GetWebContents());
2944 scoped_refptr<arc::LocalActivityResolver> local_resolver = 2944 if (!prerender_contents) {
djacobo_ 2016/07/28 20:08:01 If we are not using the local_resolver in here, re
Ben Kwa 2016/07/28 21:33:12 Done.
2945 arc_service_manager->activity_resolver(); 2945 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble());
2946 if (!local_resolver->ShouldChromeHandleUrl(handle->GetURL())) { 2946 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>(
2947 prerender::PrerenderContents* prerender_contents = 2947 handle, intent_picker_cb);
2948 prerender::PrerenderContents::FromWebContents( 2948 throttles.push_back(std::move(url_to_arc_throttle));
2949 handle->GetWebContents());
2950 if (!prerender_contents) {
2951 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble());
2952 auto url_to_arc_throttle =
2953 base::MakeUnique<arc::ArcNavigationThrottle>(handle,
2954 intent_picker_cb);
2955 throttles.push_back(std::move(url_to_arc_throttle));
2956 }
2957 } 2949 }
2958 } 2950 }
2959 } 2951 }
2960 #endif 2952 #endif
2961 2953
2962 #if defined(ENABLE_EXTENSIONS) 2954 #if defined(ENABLE_EXTENSIONS)
2963 if (!handle->IsInMainFrame()) 2955 if (!handle->IsInMainFrame())
2964 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); 2956 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
2965 #endif 2957 #endif
2966 2958
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 if (channel <= kMaxDisableEncryptionChannel) { 3040 if (channel <= kMaxDisableEncryptionChannel) {
3049 static const char* const kWebRtcDevSwitchNames[] = { 3041 static const char* const kWebRtcDevSwitchNames[] = {
3050 switches::kDisableWebRtcEncryption, 3042 switches::kDisableWebRtcEncryption,
3051 }; 3043 };
3052 to_command_line->CopySwitchesFrom(from_command_line, 3044 to_command_line->CopySwitchesFrom(from_command_line,
3053 kWebRtcDevSwitchNames, 3045 kWebRtcDevSwitchNames,
3054 arraysize(kWebRtcDevSwitchNames)); 3046 arraysize(kWebRtcDevSwitchNames));
3055 } 3047 }
3056 } 3048 }
3057 #endif // defined(ENABLE_WEBRTC) 3049 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698