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/browser/net/url_fixer_upper.h" | 5 #include "chrome/browser/net/url_fixer_upper.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
11 #endif | 11 #endif |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "googleurl/src/url_file.h" | 17 #include "googleurl/src/url_file.h" |
18 #include "googleurl/src/url_parse.h" | 18 #include "googleurl/src/url_parse.h" |
19 #include "googleurl/src/url_util.h" | 19 #include "googleurl/src/url_util.h" |
20 #include "net/base/escape.h" | 20 #include "net/base/escape.h" |
21 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
22 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 22 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
23 | 23 |
24 const char* URLFixerUpper::home_directory_override = NULL; | 24 const char* URLFixerUpper::home_directory_override = NULL; |
25 | 25 |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 636 |
637 if (part->is_valid()) { | 637 if (part->is_valid()) { |
638 // Offset the location of this component. | 638 // Offset the location of this component. |
639 part->begin += offset; | 639 part->begin += offset; |
640 | 640 |
641 // This part might not have existed in the original text. | 641 // This part might not have existed in the original text. |
642 if (part->begin < 0) | 642 if (part->begin < 0) |
643 part->reset(); | 643 part->reset(); |
644 } | 644 } |
645 } | 645 } |
OLD | NEW |