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

Side by Side Diff: chrome/browser/intranet_redirect_detector.cc

Issue 16561007: Use a direct include of utf_string_conversions.h in chrome/browser/, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/importer/toolbar_importer_unittest.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/intranet_redirect_detector.h" 5 #include "chrome/browser/intranet_redirect_detector.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/rand_util.h" 11 #include "base/rand_util.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "net/base/load_flags.h" 17 #include "net/base/load_flags.h"
18 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
19 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 19 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
20 #include "net/url_request/url_fetcher.h" 20 #include "net/url_request/url_fetcher.h"
21 #include "net/url_request/url_request_context_getter.h" 21 #include "net/url_request/url_request_context_getter.h"
22 #include "net/url_request/url_request_status.h" 22 #include "net/url_request/url_request_status.h"
23 23
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // the same thread. So just use the heuristic that any all-lowercase a-z 180 // the same thread. So just use the heuristic that any all-lowercase a-z
181 // hostname with the right number of characters is likely from the detector 181 // hostname with the right number of characters is likely from the detector
182 // (and thus should be blocked). 182 // (and thus should be blocked).
183 return ((host.length() == IntranetRedirectDetector::kNumCharsInHostnames) && 183 return ((host.length() == IntranetRedirectDetector::kNumCharsInHostnames) &&
184 (host.find_first_not_of("abcdefghijklmnopqrstuvwxyz") == 184 (host.find_first_not_of("abcdefghijklmnopqrstuvwxyz") ==
185 std::string::npos)) ? 185 std::string::npos)) ?
186 net::ERR_NAME_NOT_RESOLVED : 186 net::ERR_NAME_NOT_RESOLVED :
187 ResolveUsingPrevious(host, address_family, host_resolver_flags, addrlist, 187 ResolveUsingPrevious(host, address_family, host_resolver_flags, addrlist,
188 os_error); 188 os_error);
189 } 189 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/toolbar_importer_unittest.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698