OLD | NEW |
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/public/common/url_utils.h" | 5 #include "content/public/common/url_utils.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "content/common/savable_url_schemes.h" | 8 #include "content/common/savable_url_schemes.h" |
9 #include "content/public/common/url_constants.h" | 9 #include "content/public/common/url_constants.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 const char* const* GetSavableSchemes() { | 14 const char* const* GetSavableSchemes() { |
15 return GetSavableSchemesInternal(); | 15 return GetSavableSchemesInternal(); |
16 } | 16 } |
17 | 17 |
18 bool HasWebUIScheme(const GURL& url) { | 18 bool HasWebUIScheme(const GURL& url) { |
19 return | 19 return url.SchemeIs(kChromeDevToolsScheme) || |
20 #if !defined(OS_IOS) | |
21 url.SchemeIs(kChromeDevToolsScheme) || | |
22 #endif | |
23 url.SchemeIs(kChromeUIScheme); | 20 url.SchemeIs(kChromeUIScheme); |
24 } | 21 } |
25 | 22 |
26 bool IsSavableURL(const GURL& url) { | 23 bool IsSavableURL(const GURL& url) { |
27 for (int i = 0; GetSavableSchemes()[i] != NULL; ++i) { | 24 for (int i = 0; GetSavableSchemes()[i] != NULL; ++i) { |
28 if (url.SchemeIs(GetSavableSchemes()[i])) | 25 if (url.SchemeIs(GetSavableSchemes()[i])) |
29 return true; | 26 return true; |
30 } | 27 } |
31 return false; | 28 return false; |
32 } | 29 } |
33 | 30 |
34 } // namespace content | 31 } // namespace content |
OLD | NEW |