| 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 listener_(listener), | 524 listener_(listener), |
| 525 done_(true), | 525 done_(true), |
| 526 name_(name) { | 526 name_(name) { |
| 527 } | 527 } |
| 528 | 528 |
| 529 void AutocompleteProvider::Stop() { | 529 void AutocompleteProvider::Stop() { |
| 530 done_ = true; | 530 done_ = true; |
| 531 } | 531 } |
| 532 | 532 |
| 533 void AutocompleteProvider::DeleteMatch(const AutocompleteMatch& match) { | 533 void AutocompleteProvider::DeleteMatch(const AutocompleteMatch& match) { |
| 534 DLOG(WARNING) << "The AutocompleteProvider '" << name() |
| 535 << "' has not implemented DeleteMatch."; |
| 534 } | 536 } |
| 535 | 537 |
| 536 AutocompleteProvider::~AutocompleteProvider() { | 538 AutocompleteProvider::~AutocompleteProvider() { |
| 537 Stop(); | 539 Stop(); |
| 538 } | 540 } |
| 539 | 541 |
| 540 // static | 542 // static |
| 541 bool AutocompleteProvider::HasHTTPScheme(const string16& input) { | 543 bool AutocompleteProvider::HasHTTPScheme(const string16& input) { |
| 542 std::string utf8_input(UTF16ToUTF8(input)); | 544 std::string utf8_input(UTF16ToUTF8(input)); |
| 543 url_parse::Component scheme; | 545 url_parse::Component scheme; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 } | 1043 } |
| 1042 done_ = true; | 1044 done_ = true; |
| 1043 } | 1045 } |
| 1044 | 1046 |
| 1045 void AutocompleteController::StartExpireTimer() { | 1047 void AutocompleteController::StartExpireTimer() { |
| 1046 if (result_.HasCopiedMatches()) | 1048 if (result_.HasCopiedMatches()) |
| 1047 expire_timer_.Start(FROM_HERE, | 1049 expire_timer_.Start(FROM_HERE, |
| 1048 base::TimeDelta::FromMilliseconds(kExpireTimeMS), | 1050 base::TimeDelta::FromMilliseconds(kExpireTimeMS), |
| 1049 this, &AutocompleteController::ExpireCopiedEntries); | 1051 this, &AutocompleteController::ExpireCopiedEntries); |
| 1050 } | 1052 } |
| OLD | NEW |