Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "chrome/browser/autocomplete/autocomplete.h" | 5 #include "chrome/browser/autocomplete/autocomplete.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 497 listener_(listener), | 497 listener_(listener), |
| 498 done_(true), | 498 done_(true), |
| 499 name_(name) { | 499 name_(name) { |
| 500 } | 500 } |
| 501 | 501 |
| 502 void AutocompleteProvider::Stop() { | 502 void AutocompleteProvider::Stop() { |
| 503 done_ = true; | 503 done_ = true; |
| 504 } | 504 } |
| 505 | 505 |
| 506 void AutocompleteProvider::DeleteMatch(const AutocompleteMatch& match) { | 506 void AutocompleteProvider::DeleteMatch(const AutocompleteMatch& match) { |
| 507 DLOG(WARNING) << "The AutocompleteProvider '" | |
| 508 << name() | |
|
Peter Kasting
2011/10/05 00:11:42
Nit: Also acceptable to put this on the end of the
mrossetti
2011/10/07 17:04:14
Done.
| |
| 509 << "' has not implemented DeleteMatch."; | |
| 507 } | 510 } |
| 508 | 511 |
| 509 AutocompleteProvider::~AutocompleteProvider() { | 512 AutocompleteProvider::~AutocompleteProvider() { |
| 510 Stop(); | 513 Stop(); |
| 511 } | 514 } |
| 512 | 515 |
| 513 // static | 516 // static |
| 514 bool AutocompleteProvider::HasHTTPScheme(const string16& input) { | 517 bool AutocompleteProvider::HasHTTPScheme(const string16& input) { |
| 515 std::string utf8_input(UTF16ToUTF8(input)); | 518 std::string utf8_input(UTF16ToUTF8(input)); |
| 516 url_parse::Component scheme; | 519 url_parse::Component scheme; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1014 } | 1017 } |
| 1015 done_ = true; | 1018 done_ = true; |
| 1016 } | 1019 } |
| 1017 | 1020 |
| 1018 void AutocompleteController::StartExpireTimer() { | 1021 void AutocompleteController::StartExpireTimer() { |
| 1019 if (result_.HasCopiedMatches()) | 1022 if (result_.HasCopiedMatches()) |
| 1020 expire_timer_.Start(FROM_HERE, | 1023 expire_timer_.Start(FROM_HERE, |
| 1021 base::TimeDelta::FromMilliseconds(kExpireTimeMS), | 1024 base::TimeDelta::FromMilliseconds(kExpireTimeMS), |
| 1022 this, &AutocompleteController::ExpireCopiedEntries); | 1025 this, &AutocompleteController::ExpireCopiedEntries); |
| 1023 } | 1026 } |
| OLD | NEW |