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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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 | « content/renderer/image_loading_helper.cc ('k') | content/renderer/render_view_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3214 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 // handled by the browser so that ordinary renderer processes don't get 3225 // handled by the browser so that ordinary renderer processes don't get
3226 // blessed with file permissions. 3226 // blessed with file permissions.
3227 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); 3227 int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
3228 bool is_initial_navigation = render_view_->page_id_ == -1; 3228 bool is_initial_navigation = render_view_->page_id_ == -1;
3229 bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || 3229 bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
3230 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || 3230 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) ||
3231 url.SchemeIs(kViewSourceScheme) || 3231 url.SchemeIs(kViewSourceScheme) ||
3232 (frame->isViewSourceModeEnabled() && 3232 (frame->isViewSourceModeEnabled() &&
3233 type != blink::WebNavigationTypeReload); 3233 type != blink::WebNavigationTypeReload);
3234 3234
3235 if (!should_fork && url.SchemeIs(kFileScheme)) { 3235 if (!should_fork && url.SchemeIs(url::kFileScheme)) {
3236 // Fork non-file to file opens. Check the opener URL if this is the 3236 // Fork non-file to file opens. Check the opener URL if this is the
3237 // initial navigation in a newly opened window. 3237 // initial navigation in a newly opened window.
3238 GURL source_url(old_url); 3238 GURL source_url(old_url);
3239 if (is_initial_navigation && source_url.is_empty() && frame->opener()) 3239 if (is_initial_navigation && source_url.is_empty() && frame->opener())
3240 source_url = frame->opener()->top()->document().url(); 3240 source_url = frame->opener()->top()->document().url();
3241 DCHECK(!source_url.is_empty()); 3241 DCHECK(!source_url.is_empty());
3242 should_fork = !source_url.SchemeIs(kFileScheme); 3242 should_fork = !source_url.SchemeIs(url::kFileScheme);
3243 } 3243 }
3244 3244
3245 if (!should_fork) { 3245 if (!should_fork) {
3246 // Give the embedder a chance. 3246 // Give the embedder a chance.
3247 should_fork = GetContentClient()->renderer()->ShouldFork( 3247 should_fork = GetContentClient()->renderer()->ShouldFork(
3248 frame, url, request.httpMethod().utf8(), is_initial_navigation, 3248 frame, url, request.httpMethod().utf8(), is_initial_navigation,
3249 is_redirect, &send_referrer); 3249 is_redirect, &send_referrer);
3250 } 3250 }
3251 3251
3252 if (should_fork) { 3252 if (should_fork) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3506 #if defined(VIDEO_HOLE) 3506 #if defined(VIDEO_HOLE)
3507 render_view_->RegisterVideoHoleFrame(this); 3507 render_view_->RegisterVideoHoleFrame(this);
3508 #endif // defined(VIDEO_HOLE) 3508 #endif // defined(VIDEO_HOLE)
3509 } 3509 }
3510 return media_player_manager_; 3510 return media_player_manager_;
3511 } 3511 }
3512 3512
3513 #endif // defined(OS_ANDROID) 3513 #endif // defined(OS_ANDROID)
3514 3514
3515 } // namespace content 3515 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/image_loading_helper.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698