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

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

Issue 2411693003: Move blocking of top-level navigations to nested URLs with extension origins from non-extension pro… (Closed)
Patch Set: review nits Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/net/chrome_extensions_network_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble()); 3189 auto intent_picker_cb = base::Bind(ShowIntentPickerBubble());
3190 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>( 3190 auto url_to_arc_throttle = base::MakeUnique<arc::ArcNavigationThrottle>(
3191 handle, intent_picker_cb); 3191 handle, intent_picker_cb);
3192 throttles.push_back(std::move(url_to_arc_throttle)); 3192 throttles.push_back(std::move(url_to_arc_throttle));
3193 } 3193 }
3194 } 3194 }
3195 } 3195 }
3196 #endif 3196 #endif
3197 3197
3198 #if defined(ENABLE_EXTENSIONS) 3198 #if defined(ENABLE_EXTENSIONS)
3199 if (!handle->IsInMainFrame()) 3199 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
3200 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
3201 #endif 3200 #endif
3202 3201
3203 subresource_filter::ContentSubresourceFilterDriverFactory* 3202 subresource_filter::ContentSubresourceFilterDriverFactory*
3204 subresource_filter_driver_factory = 3203 subresource_filter_driver_factory =
3205 subresource_filter::ContentSubresourceFilterDriverFactory:: 3204 subresource_filter::ContentSubresourceFilterDriverFactory::
3206 FromWebContents(handle->GetWebContents()); 3205 FromWebContents(handle->GetWebContents());
3207 if (subresource_filter_driver_factory && handle->IsInMainFrame() && 3206 if (subresource_filter_driver_factory && handle->IsInMainFrame() &&
3208 handle->GetURL().SchemeIsHTTPOrHTTPS()) { 3207 handle->GetURL().SchemeIsHTTPOrHTTPS()) {
3209 // TODO(melandory): Activation logic should be moved to the 3208 // TODO(melandory): Activation logic should be moved to the
3210 // WebContentsObserver, once ReadyToCommitNavigation is available on 3209 // WebContentsObserver, once ReadyToCommitNavigation is available on
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
3293 if (channel <= kMaxDisableEncryptionChannel) { 3292 if (channel <= kMaxDisableEncryptionChannel) {
3294 static const char* const kWebRtcDevSwitchNames[] = { 3293 static const char* const kWebRtcDevSwitchNames[] = {
3295 switches::kDisableWebRtcEncryption, 3294 switches::kDisableWebRtcEncryption,
3296 }; 3295 };
3297 to_command_line->CopySwitchesFrom(from_command_line, 3296 to_command_line->CopySwitchesFrom(from_command_line,
3298 kWebRtcDevSwitchNames, 3297 kWebRtcDevSwitchNames,
3299 arraysize(kWebRtcDevSwitchNames)); 3298 arraysize(kWebRtcDevSwitchNames));
3300 } 3299 }
3301 } 3300 }
3302 #endif // defined(ENABLE_WEBRTC) 3301 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_extensions_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698