| OLD | NEW | 
|   1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |   1 // Copyright (c) 2012 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_HISTORY_QUICK_PROVIDER_H_ |   5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 
|   6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |   6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 
|   7  |   7  | 
|   8 #include <string> |   8 #include <string> | 
|   9  |   9  | 
|  10 #include "base/basictypes.h" |  10 #include "base/basictypes.h" | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
|  25 // the history system) which quickly (and synchronously) provides matching |  25 // the history system) which quickly (and synchronously) provides matching | 
|  26 // results from recently or frequently visited sites in the profile's |  26 // results from recently or frequently visited sites in the profile's | 
|  27 // history. |  27 // history. | 
|  28 class HistoryQuickProvider : public HistoryProvider { |  28 class HistoryQuickProvider : public HistoryProvider { | 
|  29  public: |  29  public: | 
|  30   explicit HistoryQuickProvider(Profile* profile); |  30   explicit HistoryQuickProvider(Profile* profile); | 
|  31  |  31  | 
|  32   // AutocompleteProvider. |minimal_changes| is ignored since there is no asynch |  32   // AutocompleteProvider. |minimal_changes| is ignored since there is no asynch | 
|  33   // completion performed. |  33   // completion performed. | 
|  34   virtual void Start(const AutocompleteInput& input, |  34   virtual void Start(const AutocompleteInput& input, | 
|  35                      bool minimal_changes) OVERRIDE; |  35                      bool minimal_changes) override; | 
|  36  |  36  | 
|  37   // Disable this provider. For unit testing purposes only. This is required |  37   // Disable this provider. For unit testing purposes only. This is required | 
|  38   // because this provider is closely associated with the HistoryURLProvider |  38   // because this provider is closely associated with the HistoryURLProvider | 
|  39   // and in order to properly test the latter the HistoryQuickProvider must |  39   // and in order to properly test the latter the HistoryQuickProvider must | 
|  40   // be disabled. |  40   // be disabled. | 
|  41   // TODO(mrossetti): Eliminate this once the HUP has been refactored. |  41   // TODO(mrossetti): Eliminate this once the HUP has been refactored. | 
|  42   static void set_disabled(bool disabled) { disabled_ = disabled; } |  42   static void set_disabled(bool disabled) { disabled_ = disabled; } | 
|  43  |  43  | 
|  44  private: |  44  private: | 
|  45   friend class HistoryQuickProviderTest; |  45   friend class HistoryQuickProviderTest; | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|  71   // Only used for testing. |  71   // Only used for testing. | 
|  72   scoped_ptr<history::InMemoryURLIndex> index_for_testing_; |  72   scoped_ptr<history::InMemoryURLIndex> index_for_testing_; | 
|  73  |  73  | 
|  74   // This provider is disabled when true. |  74   // This provider is disabled when true. | 
|  75   static bool disabled_; |  75   static bool disabled_; | 
|  76  |  76  | 
|  77   DISALLOW_COPY_AND_ASSIGN(HistoryQuickProvider); |  77   DISALLOW_COPY_AND_ASSIGN(HistoryQuickProvider); | 
|  78 }; |  78 }; | 
|  79  |  79  | 
|  80 #endif  // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ |  80 #endif  // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ | 
| OLD | NEW |