OLD | NEW |
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 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 if (url.is_empty()) | 957 if (url.is_empty()) |
958 return false; | 958 return false; |
959 | 959 |
960 if (url.SchemeIs(chrome::kHttpScheme) || | 960 if (url.SchemeIs(chrome::kHttpScheme) || |
961 url.SchemeIs(chrome::kHttpsScheme) || | 961 url.SchemeIs(chrome::kHttpsScheme) || |
962 url.SchemeIs(chrome::kAboutScheme)) | 962 url.SchemeIs(chrome::kAboutScheme)) |
963 return true; | 963 return true; |
964 | 964 |
965 // Additional checking for view-source. Allow only http and https | 965 // Additional checking for view-source. Allow only http and https |
966 // URLs in view source. | 966 // URLs in view source. |
967 if (url.SchemeIs(chrome::kViewSourceScheme)) { | 967 if (url.SchemeIs(content::kViewSourceScheme)) { |
968 GURL sub_url(url.path()); | 968 GURL sub_url(url.path()); |
969 if (sub_url.SchemeIs(chrome::kHttpScheme) || | 969 if (sub_url.SchemeIs(chrome::kHttpScheme) || |
970 sub_url.SchemeIs(chrome::kHttpsScheme)) | 970 sub_url.SchemeIs(chrome::kHttpsScheme)) |
971 return true; | 971 return true; |
972 else | 972 else |
973 return false; | 973 return false; |
974 } | 974 } |
975 | 975 |
976 if (is_privileged && | 976 if (is_privileged && |
977 (url.SchemeIs(chrome::kDataScheme) || | 977 (url.SchemeIs(chrome::kDataScheme) || |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1650 wininet_connection_count_updated = true; | 1650 wininet_connection_count_updated = true; |
1651 return true; | 1651 return true; |
1652 } | 1652 } |
1653 | 1653 |
1654 void GetChromeFrameProfilePath(const string16& profile_name, | 1654 void GetChromeFrameProfilePath(const string16& profile_name, |
1655 base::FilePath* profile_path) { | 1655 base::FilePath* profile_path) { |
1656 chrome::GetChromeFrameUserDataDirectory(profile_path); | 1656 chrome::GetChromeFrameUserDataDirectory(profile_path); |
1657 *profile_path = profile_path->Append(profile_name); | 1657 *profile_path = profile_path->Append(profile_name); |
1658 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); | 1658 DVLOG(1) << __FUNCTION__ << ": " << profile_path->value(); |
1659 } | 1659 } |
OLD | NEW |