OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/url_formatter/url_formatter.h" | 5 #include "components/url_formatter/url_formatter.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/numerics/safe_conversions.h" | 12 #include "base/numerics/safe_conversions.h" |
14 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
15 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_offset_string_conversions.h" | 15 #include "base/strings/utf_offset_string_conversions.h" |
17 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
18 #include "base/threading/thread_local_storage.h" | 17 #include "base/threading/thread_local_storage.h" |
19 #include "third_party/icu/source/common/unicode/uidna.h" | 18 #include "third_party/icu/source/common/unicode/uidna.h" |
20 #include "third_party/icu/source/common/unicode/uniset.h" | 19 #include "third_party/icu/source/common/unicode/uniset.h" |
21 #include "third_party/icu/source/common/unicode/uscript.h" | 20 #include "third_party/icu/source/common/unicode/uscript.h" |
22 #include "third_party/icu/source/common/unicode/uvernum.h" | 21 #include "third_party/icu/source/common/unicode/uvernum.h" |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 return base::StartsWith(text, www, base::CompareCase::SENSITIVE) | 791 return base::StartsWith(text, www, base::CompareCase::SENSITIVE) |
793 ? text.substr(www.length()) : text; | 792 ? text.substr(www.length()) : text; |
794 } | 793 } |
795 | 794 |
796 base::string16 StripWWWFromHost(const GURL& url) { | 795 base::string16 StripWWWFromHost(const GURL& url) { |
797 DCHECK(url.is_valid()); | 796 DCHECK(url.is_valid()); |
798 return StripWWW(base::ASCIIToUTF16(url.host_piece())); | 797 return StripWWW(base::ASCIIToUTF16(url.host_piece())); |
799 } | 798 } |
800 | 799 |
801 } // namespace url_formatter | 800 } // namespace url_formatter |
OLD | NEW |