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

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

Issue 23658056: content: Move kHttpScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/url_constants.cc ('k') | extensions/common/url_pattern.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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 bool is_form_post) { 514 bool is_form_post) {
515 if (!IsTopLevelNavigation(frame)) 515 if (!IsTopLevelNavigation(frame))
516 return false; 516 return false;
517 517
518 // Navigations initiated within Webkit are not sent out to the external host 518 // Navigations initiated within Webkit are not sent out to the external host
519 // in the following cases. 519 // in the following cases.
520 // 1. The url scheme is not http/https 520 // 1. The url scheme is not http/https
521 // 2. The origin of the url and the opener is the same in which case the 521 // 2. The origin of the url and the opener is the same in which case the
522 // opener relationship is maintained. 522 // opener relationship is maintained.
523 // 3. Reloads/form submits/back forward navigations 523 // 3. Reloads/form submits/back forward navigations
524 if (!url.SchemeIs(chrome::kHttpScheme) && !url.SchemeIs(kHttpsScheme)) 524 if (!url.SchemeIs(kHttpScheme) && !url.SchemeIs(kHttpsScheme))
525 return false; 525 return false;
526 526
527 if (type != WebKit::WebNavigationTypeReload && 527 if (type != WebKit::WebNavigationTypeReload &&
528 type != WebKit::WebNavigationTypeBackForward && !is_form_post) { 528 type != WebKit::WebNavigationTypeBackForward && !is_form_post) {
529 // The opener relationship between the new window and the parent allows the 529 // The opener relationship between the new window and the parent allows the
530 // new window to script the parent and vice versa. This is not allowed if 530 // new window to script the parent and vice versa. This is not allowed if
531 // the origins of the two domains are different. This can be treated as a 531 // the origins of the two domains are different. This can be treated as a
532 // top level navigation and routed back to the host. 532 // top level navigation and routed back to the host.
533 WebKit::WebFrame* opener = frame->opener(); 533 WebKit::WebFrame* opener = frame->opener();
534 if (!opener) 534 if (!opener)
(...skipping 5993 matching lines...) Expand 10 before | Expand all | Expand 10 after
6528 for (size_t i = 0; i < icon_urls.size(); i++) { 6528 for (size_t i = 0; i < icon_urls.size(); i++) {
6529 WebURL url = icon_urls[i].iconURL(); 6529 WebURL url = icon_urls[i].iconURL();
6530 if (!url.isEmpty()) 6530 if (!url.isEmpty())
6531 urls.push_back(FaviconURL(url, 6531 urls.push_back(FaviconURL(url,
6532 ToFaviconType(icon_urls[i].iconType()))); 6532 ToFaviconType(icon_urls[i].iconType())));
6533 } 6533 }
6534 SendUpdateFaviconURL(urls); 6534 SendUpdateFaviconURL(urls);
6535 } 6535 }
6536 6536
6537 } // namespace content 6537 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/url_constants.cc ('k') | extensions/common/url_pattern.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698