OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/google/core/browser/google_util.h" | 5 #include "components/google/core/browser/google_util.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
12 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_split.h" | 16 #include "base/strings/string_split.h" |
14 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
16 #include "components/google/core/browser/google_switches.h" | 19 #include "components/google/core/browser/google_switches.h" |
17 #include "components/google/core/browser/google_url_tracker.h" | 20 #include "components/google/core/browser/google_url_tracker.h" |
18 #include "components/url_formatter/url_fixer.h" | 21 #include "components/url_formatter/url_fixer.h" |
19 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 22 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
20 #include "net/base/url_util.h" | 23 #include "net/base/url_util.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 215 } |
213 | 216 |
214 bool IsYoutubeDomainUrl(const GURL& url, | 217 bool IsYoutubeDomainUrl(const GURL& url, |
215 SubdomainPermission subdomain_permission, | 218 SubdomainPermission subdomain_permission, |
216 PortPermission port_permission) { | 219 PortPermission port_permission) { |
217 return IsValidURL(url, port_permission) && | 220 return IsValidURL(url, port_permission) && |
218 IsValidHostName(url.host(), "youtube", subdomain_permission); | 221 IsValidHostName(url.host(), "youtube", subdomain_permission); |
219 } | 222 } |
220 | 223 |
221 } // namespace google_util | 224 } // namespace google_util |
OLD | NEW |