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

Unified Diff: chrome/browser/history/shortcuts_database.h

Issue 9689085: Clean up ShortcutsProvider and related classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/shortcuts_database.h
===================================================================
--- chrome/browser/history/shortcuts_database.h (revision 125990)
+++ chrome/browser/history/shortcuts_database.h (working copy)
@@ -14,7 +14,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/string16.h"
-#include "chrome/browser/autocomplete/shortcuts_provider_shortcut.h"
+#include "chrome/browser/history/shortcuts_backend.h"
#include "googleurl/src/gurl.h"
#include "sql/connection.h"
@@ -40,16 +40,18 @@
// number_of_hits Number of times that the entry has been selected.
class ShortcutsDatabase : public base::RefCountedThreadSafe<ShortcutsDatabase> {
public:
+ typedef std::map<std::string, ShortcutsBackend::Shortcut> GuidToShortcutMap;
+
explicit ShortcutsDatabase(const FilePath& folder_path);
virtual ~ShortcutsDatabase();
bool Init();
// Adds the ShortcutsProvider::Shortcut to the database.
- bool AddShortcut(const shortcuts_provider::Shortcut& shortcut);
+ bool AddShortcut(const ShortcutsBackend::Shortcut& shortcut);
// Updates timing and selection count for the ShortcutsProvider::Shortcut.
- bool UpdateShortcut(const shortcuts_provider::Shortcut& shortcut);
+ bool UpdateShortcut(const ShortcutsBackend::Shortcut& shortcut);
// Deletes the ShortcutsProvider::Shortcuts with the id.
bool DeleteShortcutsWithIds(const std::vector<std::string>& shortcut_ids);
@@ -61,8 +63,7 @@
bool DeleteAllShortcuts();
// Loads all of the shortcuts.
- bool LoadShortcuts(
- std::map<std::string, shortcuts_provider::Shortcut>* shortcuts);
+ bool LoadShortcuts(GuidToShortcutMap* shortcuts);
private:
// Ensures that the table is present.

Powered by Google App Engine
This is Rietveld 408576698