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

Side by Side Diff: chrome/browser/autocomplete/history_quick_provider.h

Issue 329073003: Make HistoryQuickProvider::DeleteMatch also delete the underlying URL from the History Database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 6 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) 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 17 matching lines...) Expand all
28 class HistoryQuickProvider : public HistoryProvider { 28 class HistoryQuickProvider : public HistoryProvider {
29 public: 29 public:
30 HistoryQuickProvider(AutocompleteProviderListener* listener, 30 HistoryQuickProvider(AutocompleteProviderListener* listener,
31 Profile* profile); 31 Profile* profile);
32 32
33 // AutocompleteProvider. |minimal_changes| is ignored since there is no asynch 33 // AutocompleteProvider. |minimal_changes| is ignored since there is no asynch
34 // completion performed. 34 // completion performed.
35 virtual void Start(const AutocompleteInput& input, 35 virtual void Start(const AutocompleteInput& input,
36 bool minimal_changes) OVERRIDE; 36 bool minimal_changes) OVERRIDE;
37 37
38 virtual void DeleteMatch(const AutocompleteMatch& match) OVERRIDE;
39
40 // Disable this provider. For unit testing purposes only. This is required 38 // Disable this provider. For unit testing purposes only. This is required
41 // because this provider is closely associated with the HistoryURLProvider 39 // because this provider is closely associated with the HistoryURLProvider
42 // and in order to properly test the latter the HistoryQuickProvider must 40 // and in order to properly test the latter the HistoryQuickProvider must
43 // be disabled. 41 // be disabled.
44 // TODO(mrossetti): Eliminate this once the HUP has been refactored. 42 // TODO(mrossetti): Eliminate this once the HUP has been refactored.
45 static void set_disabled(bool disabled) { disabled_ = disabled; } 43 static void set_disabled(bool disabled) { disabled_ = disabled; }
46 44
47 private: 45 private:
48 friend class HistoryQuickProviderTest; 46 friend class HistoryQuickProviderTest;
49 FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Spans); 47 FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Spans);
(...skipping 24 matching lines...) Expand all
74 // Only used for testing. 72 // Only used for testing.
75 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; 73 scoped_ptr<history::InMemoryURLIndex> index_for_testing_;
76 74
77 // This provider is disabled when true. 75 // This provider is disabled when true.
78 static bool disabled_; 76 static bool disabled_;
79 77
80 DISALLOW_COPY_AND_ASSIGN(HistoryQuickProvider); 78 DISALLOW_COPY_AND_ASSIGN(HistoryQuickProvider);
81 }; 79 };
82 80
83 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ 81 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/history_provider.cc ('k') | chrome/browser/autocomplete/history_quick_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698