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

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

Issue 6366019: Part 1 of repairing regressions to my old clang check plugins so Nico can (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove Nico's changes that I patched in for testing. Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/history_url_provider.h" 5 #include "chrome/browser/autocomplete/history_url_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 if (!match.url_info.typed_count() || 418 if (!match.url_info.typed_count() ||
419 ((match.url_info.typed_count() == 1) && 419 ((match.url_info.typed_count() == 1) &&
420 !history::IsHostOnly(match.url_info.url()))) 420 !history::IsHostOnly(match.url_info.url())))
421 return false; 421 return false;
422 422
423 params->matches.push_back(HistoryMatchToACMatch(params, match, 423 params->matches.push_back(HistoryMatchToACMatch(params, match,
424 INLINE_AUTOCOMPLETE, 0)); 424 INLINE_AUTOCOMPLETE, 0));
425 return true; 425 return true;
426 } 426 }
427 427
428 HistoryURLProvider::~HistoryURLProvider() {}
429
428 // static 430 // static
429 history::Prefixes HistoryURLProvider::GetPrefixes() { 431 history::Prefixes HistoryURLProvider::GetPrefixes() {
430 // We'll complete text following these prefixes. 432 // We'll complete text following these prefixes.
431 // NOTE: There's no requirement that these be in any particular order. 433 // NOTE: There's no requirement that these be in any particular order.
432 Prefixes prefixes; 434 Prefixes prefixes;
433 prefixes.push_back(Prefix(ASCIIToUTF16("https://www."), 2)); 435 prefixes.push_back(Prefix(ASCIIToUTF16("https://www."), 2));
434 prefixes.push_back(Prefix(ASCIIToUTF16("http://www."), 2)); 436 prefixes.push_back(Prefix(ASCIIToUTF16("http://www."), 2));
435 prefixes.push_back(Prefix(ASCIIToUTF16("ftp://ftp."), 2)); 437 prefixes.push_back(Prefix(ASCIIToUTF16("ftp://ftp."), 2));
436 prefixes.push_back(Prefix(ASCIIToUTF16("ftp://www."), 2)); 438 prefixes.push_back(Prefix(ASCIIToUTF16("ftp://www."), 2));
437 prefixes.push_back(Prefix(ASCIIToUTF16("https://"), 1)); 439 prefixes.push_back(Prefix(ASCIIToUTF16("https://"), 1));
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 &match.contents_class); 805 &match.contents_class);
804 } 806 }
805 match.description = info.title(); 807 match.description = info.title();
806 AutocompleteMatch::ClassifyMatchInString(params->input.text(), 808 AutocompleteMatch::ClassifyMatchInString(params->input.text(),
807 info.title(), 809 info.title(),
808 ACMatchClassification::NONE, 810 ACMatchClassification::NONE,
809 &match.description_class); 811 &match.description_class);
810 812
811 return match; 813 return match;
812 } 814 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698