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

Side by Side Diff: chrome_frame/utils.cc

Issue 23526048: Support URL fragment resolution againt non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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
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_frame/utils.h" 5 #include "chrome_frame/utils.h"
6 6
7 #include <atlsafe.h> 7 #include <atlsafe.h>
8 #include <atlsecurity.h> 8 #include <atlsecurity.h>
9 #include <htiframe.h> 9 #include <htiframe.h>
10 #include <mshtml.h> 10 #include <mshtml.h>
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 return false; 1002 return false;
1003 1003
1004 if (url.SchemeIs(content::kHttpScheme) || 1004 if (url.SchemeIs(content::kHttpScheme) ||
1005 url.SchemeIs(content::kHttpsScheme) || 1005 url.SchemeIs(content::kHttpsScheme) ||
1006 url.SchemeIs(chrome::kAboutScheme)) 1006 url.SchemeIs(chrome::kAboutScheme))
1007 return true; 1007 return true;
1008 1008
1009 // Additional checking for view-source. Allow only http and https 1009 // Additional checking for view-source. Allow only http and https
1010 // URLs in view source. 1010 // URLs in view source.
1011 if (url.SchemeIs(content::kViewSourceScheme)) { 1011 if (url.SchemeIs(content::kViewSourceScheme)) {
1012 GURL sub_url(url.path()); 1012 GURL sub_url(url.Content());
1013 if (sub_url.SchemeIs(content::kHttpScheme) || 1013 if (sub_url.SchemeIs(content::kHttpScheme) ||
1014 sub_url.SchemeIs(content::kHttpsScheme)) 1014 sub_url.SchemeIs(content::kHttpsScheme))
1015 return true; 1015 return true;
1016 else 1016 else
1017 return false; 1017 return false;
1018 } 1018 }
1019 1019
1020 if (is_privileged && 1020 if (is_privileged &&
1021 (url.SchemeIs(chrome::kDataScheme) || 1021 (url.SchemeIs(chrome::kDataScheme) ||
1022 url.SchemeIs(extensions::kExtensionScheme))) 1022 url.SchemeIs(extensions::kExtensionScheme)))
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 wininet_connection_count_updated = true; 1694 wininet_connection_count_updated = true;
1695 return true; 1695 return true;
1696 } 1696 }
1697 1697
1698 void GetChromeFrameProfilePath(const string16& profile_name, 1698 void GetChromeFrameProfilePath(const string16& profile_name,
1699 base::FilePath* profile_path) { 1699 base::FilePath* profile_path) {
1700 chrome::GetChromeFrameUserDataDirectory(profile_path); 1700 chrome::GetChromeFrameUserDataDirectory(profile_path);
1701 *profile_path = profile_path->Append(profile_name); 1701 *profile_path = profile_path->Append(profile_name);
1702 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); 1702 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value();
1703 } 1703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698