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

Side by Side Diff: chrome/browser/autocomplete/autocomplete.h

Issue 7822009: Fix crash in CanFindIntranetURL() due to FixupUserInput() changing the AutocompleteInput's text_ ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | « no previous file | chrome/browser/autocomplete/autocomplete.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // formatted string with the same meaning as the original URL (i.e. it will 259 // formatted string with the same meaning as the original URL (i.e. it will
260 // re-append a slash if necessary). 260 // re-append a slash if necessary).
261 static string16 FormattedStringWithEquivalentMeaning( 261 static string16 FormattedStringWithEquivalentMeaning(
262 const GURL& url, 262 const GURL& url,
263 const string16& formatted_url); 263 const string16& formatted_url);
264 264
265 // User-provided text to be completed. 265 // User-provided text to be completed.
266 const string16& text() const { return text_; } 266 const string16& text() const { return text_; }
267 267
268 // Use of this setter is risky, since no other internal state is updated 268 // Use of this setter is risky, since no other internal state is updated
269 // besides |text_|. Only callers who know that they're not changing the 269 // besides |text_| and |parts_|. Only callers who know that they're not
270 // type/scheme/etc. should use this. 270 // changing the type/scheme/etc. should use this.
271 void set_text(const string16& text) { text_ = text; } 271 void UpdateText(const string16& text, const url_parse::Parsed& parts);
272 272
273 // User's desired TLD, if one is not already present in the text to 273 // User's desired TLD, if one is not already present in the text to
274 // autocomplete. When this is non-empty, it also implies that "www." should 274 // autocomplete. When this is non-empty, it also implies that "www." should
275 // be prepended to the domain where possible. This should not have a leading 275 // be prepended to the domain where possible. This should not have a leading
276 // '.' (use "com" instead of ".com"). 276 // '.' (use "com" instead of ".com").
277 const string16& desired_tld() const { return desired_tld_; } 277 const string16& desired_tld() const { return desired_tld_; }
278 278
279 // The type of input supplied. 279 // The type of input supplied.
280 Type type() const { return type_; } 280 Type type() const { return type_; }
281 281
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 AutocompleteInput::Type input_type; 747 AutocompleteInput::Type input_type;
748 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). 748 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch).
749 size_t selected_index; 749 size_t selected_index;
750 // Inline autocompleted length (if displayed). 750 // Inline autocompleted length (if displayed).
751 size_t inline_autocompleted_length; 751 size_t inline_autocompleted_length;
752 // Result set. 752 // Result set.
753 const AutocompleteResult& result; 753 const AutocompleteResult& result;
754 }; 754 };
755 755
756 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ 756 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698