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

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

Issue 23112033: content: Move kHttpsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 bool is_form_post) { 511 bool is_form_post) {
512 if (!IsTopLevelNavigation(frame)) 512 if (!IsTopLevelNavigation(frame))
513 return false; 513 return false;
514 514
515 // Navigations initiated within Webkit are not sent out to the external host 515 // Navigations initiated within Webkit are not sent out to the external host
516 // in the following cases. 516 // in the following cases.
517 // 1. The url scheme is not http/https 517 // 1. The url scheme is not http/https
518 // 2. The origin of the url and the opener is the same in which case the 518 // 2. The origin of the url and the opener is the same in which case the
519 // opener relationship is maintained. 519 // opener relationship is maintained.
520 // 3. Reloads/form submits/back forward navigations 520 // 3. Reloads/form submits/back forward navigations
521 if (!url.SchemeIs(chrome::kHttpScheme) && !url.SchemeIs(chrome::kHttpsScheme)) 521 if (!url.SchemeIs(chrome::kHttpScheme) && !url.SchemeIs(kHttpsScheme))
522 return false; 522 return false;
523 523
524 if (type != WebKit::WebNavigationTypeReload && 524 if (type != WebKit::WebNavigationTypeReload &&
525 type != WebKit::WebNavigationTypeBackForward && !is_form_post) { 525 type != WebKit::WebNavigationTypeBackForward && !is_form_post) {
526 // The opener relationship between the new window and the parent allows the 526 // The opener relationship between the new window and the parent allows the
527 // new window to script the parent and vice versa. This is not allowed if 527 // new window to script the parent and vice versa. This is not allowed if
528 // the origins of the two domains are different. This can be treated as a 528 // the origins of the two domains are different. This can be treated as a
529 // top level navigation and routed back to the host. 529 // top level navigation and routed back to the host.
530 WebKit::WebFrame* opener = frame->opener(); 530 WebKit::WebFrame* opener = frame->opener();
531 if (!opener) 531 if (!opener)
(...skipping 6004 matching lines...) Expand 10 before | Expand all | Expand 10 after
6536 std::vector<FaviconURL> urls; 6536 std::vector<FaviconURL> urls;
6537 for (size_t i = 0; i < icon_urls.size(); i++) { 6537 for (size_t i = 0; i < icon_urls.size(); i++) {
6538 WebURL url = icon_urls[i].iconURL(); 6538 WebURL url = icon_urls[i].iconURL();
6539 if (!url.isEmpty()) 6539 if (!url.isEmpty())
6540 urls.push_back(FaviconURL(url, 6540 urls.push_back(FaviconURL(url,
6541 ToFaviconType(icon_urls[i].iconType()))); 6541 ToFaviconType(icon_urls[i].iconType())));
6542 } 6542 }
6543 SendUpdateFaviconURL(urls); 6543 SendUpdateFaviconURL(urls);
6544 } 6544 }
6545 6545
6546
6547 } // namespace content 6546 } // 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