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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_input.cc

Issue 120593003: Move kFileScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
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/autocomplete/autocomplete_input.h" 5 #include "chrome/browser/autocomplete/autocomplete_input.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/external_protocol/external_protocol_handler.h" 9 #include "chrome/browser/external_protocol/external_protocol_handler.h"
10 #include "chrome/browser/profiles/profile_io_data.h" 10 #include "chrome/browser/profiles/profile_io_data.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 if (!parts) 146 if (!parts)
147 parts = &local_parts; 147 parts = &local_parts;
148 const base::string16 parsed_scheme(URLFixerUpper::SegmentURL(text, parts)); 148 const base::string16 parsed_scheme(URLFixerUpper::SegmentURL(text, parts));
149 if (scheme) 149 if (scheme)
150 *scheme = parsed_scheme; 150 *scheme = parsed_scheme;
151 if (canonicalized_url) { 151 if (canonicalized_url) {
152 *canonicalized_url = URLFixerUpper::FixupURL( 152 *canonicalized_url = URLFixerUpper::FixupURL(
153 base::UTF16ToUTF8(text), base::UTF16ToUTF8(desired_tld)); 153 base::UTF16ToUTF8(text), base::UTF16ToUTF8(desired_tld));
154 } 154 }
155 155
156 if (LowerCaseEqualsASCII(parsed_scheme, chrome::kFileScheme)) { 156 if (LowerCaseEqualsASCII(parsed_scheme, content::kFileScheme)) {
157 // A user might or might not type a scheme when entering a file URL. In 157 // A user might or might not type a scheme when entering a file URL. In
158 // either case, |parsed_scheme| will tell us that this is a file URL, but 158 // either case, |parsed_scheme| will tell us that this is a file URL, but
159 // |parts->scheme| might be empty, e.g. if the user typed "C:\foo". 159 // |parts->scheme| might be empty, e.g. if the user typed "C:\foo".
160 return URL; 160 return URL;
161 } 161 }
162 162
163 if (LowerCaseEqualsASCII(parsed_scheme, content::kFileSystemScheme)) { 163 if (LowerCaseEqualsASCII(parsed_scheme, content::kFileSystemScheme)) {
164 // This could theoretically be a strange search, but let's check. 164 // This could theoretically be a strange search, but let's check.
165 // If it's got an inner_url with a scheme, it's a URL, whether it's valid or 165 // If it's got an inner_url with a scheme, it's a URL, whether it's valid or
166 // not. 166 // not.
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 current_page_classification_ = AutocompleteInput::INVALID_SPEC; 530 current_page_classification_ = AutocompleteInput::INVALID_SPEC;
531 type_ = INVALID; 531 type_ = INVALID;
532 parts_ = url_parse::Parsed(); 532 parts_ = url_parse::Parsed();
533 scheme_.clear(); 533 scheme_.clear();
534 canonicalized_url_ = GURL(); 534 canonicalized_url_ = GURL();
535 prevent_inline_autocomplete_ = false; 535 prevent_inline_autocomplete_ = false;
536 prefer_keyword_ = false; 536 prefer_keyword_ = false;
537 allow_exact_keyword_match_ = false; 537 allow_exact_keyword_match_ = false;
538 matches_requested_ = ALL_MATCHES; 538 matches_requested_ = ALL_MATCHES;
539 } 539 }
OLDNEW
« no previous file with comments | « android_webview/native/cookie_manager.cc ('k') | chrome/browser/browsing_data/browsing_data_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698