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

Side by Side Diff: components/url_formatter/url_fixer.cc

Issue 1549993003: Switch to standard integer types in components/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 "components/url_formatter/url_fixer.h" 5 #include "components/url_formatter/url_fixer.h"
6 6
7 #include <stddef.h>
8
7 #include <algorithm> 9 #include <algorithm>
8 10
9 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
11 #include "base/logging.h" 13 #include "base/logging.h"
12 #if defined(OS_POSIX)
13 #include "base/path_service.h"
14 #endif
15 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "build/build_config.h"
17 #include "components/url_formatter/url_formatter.h" 17 #include "components/url_formatter/url_formatter.h"
18 #include "net/base/escape.h" 18 #include "net/base/escape.h"
19 #include "net/base/filename_util.h" 19 #include "net/base/filename_util.h"
20 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 20 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
21 #include "url/third_party/mozilla/url_parse.h" 21 #include "url/third_party/mozilla/url_parse.h"
22 #include "url/url_file.h" 22 #include "url/url_file.h"
23 #include "url/url_util.h" 23 #include "url/url_util.h"
24 24
25 #if defined(OS_POSIX)
26 #include "base/path_service.h"
27 #endif
28
25 namespace url_formatter { 29 namespace url_formatter {
26 30
27 const char* home_directory_override = nullptr; 31 const char* home_directory_override = nullptr;
28 32
29 namespace { 33 namespace {
30 34
31 // Hardcode these constants to avoid dependences on //chrome and //content. 35 // Hardcode these constants to avoid dependences on //chrome and //content.
32 const char kChromeUIScheme[] = "chrome"; 36 const char kChromeUIScheme[] = "chrome";
33 const char kChromeUIDefaultHost[] = "version"; 37 const char kChromeUIDefaultHost[] = "version";
34 const char kViewSourceScheme[] = "view-source"; 38 const char kViewSourceScheme[] = "view-source";
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 668 }
665 669
666 bool IsEquivalentScheme(const std::string& scheme1, 670 bool IsEquivalentScheme(const std::string& scheme1,
667 const std::string& scheme2) { 671 const std::string& scheme2) {
668 return scheme1 == scheme2 || 672 return scheme1 == scheme2 ||
669 (scheme1 == url::kAboutScheme && scheme2 == kChromeUIScheme) || 673 (scheme1 == url::kAboutScheme && scheme2 == kChromeUIScheme) ||
670 (scheme1 == kChromeUIScheme && scheme2 == url::kAboutScheme); 674 (scheme1 == kChromeUIScheme && scheme2 == url::kAboutScheme);
671 } 675 }
672 676
673 } // namespace url_formatter 677 } // namespace url_formatter
OLDNEW
« no previous file with comments | « components/url_formatter/elide_url_unittest.cc ('k') | components/url_formatter/url_fixer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698