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 '" << name() |
| 508 << "' has not implemented DeleteMatch."; |
507 } | 509 } |
508 | 510 |
509 AutocompleteProvider::~AutocompleteProvider() { | 511 AutocompleteProvider::~AutocompleteProvider() { |
510 Stop(); | 512 Stop(); |
511 } | 513 } |
512 | 514 |
513 // static | 515 // static |
514 bool AutocompleteProvider::HasHTTPScheme(const string16& input) { | 516 bool AutocompleteProvider::HasHTTPScheme(const string16& input) { |
515 std::string utf8_input(UTF16ToUTF8(input)); | 517 std::string utf8_input(UTF16ToUTF8(input)); |
516 url_parse::Component scheme; | 518 url_parse::Component scheme; |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 } | 1016 } |
1015 done_ = true; | 1017 done_ = true; |
1016 } | 1018 } |
1017 | 1019 |
1018 void AutocompleteController::StartExpireTimer() { | 1020 void AutocompleteController::StartExpireTimer() { |
1019 if (result_.HasCopiedMatches()) | 1021 if (result_.HasCopiedMatches()) |
1020 expire_timer_.Start(FROM_HERE, | 1022 expire_timer_.Start(FROM_HERE, |
1021 base::TimeDelta::FromMilliseconds(kExpireTimeMS), | 1023 base::TimeDelta::FromMilliseconds(kExpireTimeMS), |
1022 this, &AutocompleteController::ExpireCopiedEntries); | 1024 this, &AutocompleteController::ExpireCopiedEntries); |
1023 } | 1025 } |
OLD | NEW |