| Index: chrome/browser/search/instant_service.h
|
| diff --git a/chrome/browser/search/instant_service.h b/chrome/browser/search/instant_service.h
|
| index 42d3150543d2c702bfcc80dd527dfbd40e031b3a..c2d0e27c0e5186d7ab27e0cc972e01deffe384c8 100644
|
| --- a/chrome/browser/search/instant_service.h
|
| +++ b/chrome/browser/search/instant_service.h
|
| @@ -8,13 +8,14 @@
|
| #include <map>
|
| #include <set>
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "chrome/browser/history/history_types.h"
|
| -#include "chrome/common/instant_restricted_id_cache.h"
|
| +#include "chrome/common/instant_types.h"
|
| #include "components/browser_context_keyed_service/browser_context_keyed_service.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| @@ -34,19 +35,6 @@ class InstantService : public BrowserContextKeyedService,
|
| explicit InstantService(Profile* profile);
|
| virtual ~InstantService();
|
|
|
| - // A utility to translate an Instant path if it is of Most Visited item ID
|
| - // form. If path is a Most Visited item ID and we have a URL for it, then
|
| - // this URL is returned in string form. The |path| is a URL fragment
|
| - // corresponding to the path of url with the leading slash ("/") stripped.
|
| - // For example, chrome-search://favicon/72 would yield a |path| value of "72",
|
| - // and since 72 is a valid uint64 the path is translated to a valid url,
|
| - // "http://bingo.com/", say.
|
| - static const std::string MaybeTranslateInstantPathOnUI(
|
| - Profile* profile, const std::string& path);
|
| - static const std::string MaybeTranslateInstantPathOnIO(
|
| - const net::URLRequest* request, const std::string& path);
|
| - static bool IsInstantPath(const GURL& url);
|
| -
|
| // Add, remove, and query RenderProcessHost IDs that are associated with
|
| // Instant processes.
|
| void AddInstantProcess(int process_id);
|
| @@ -60,10 +48,6 @@ class InstantService : public BrowserContextKeyedService,
|
|
|
| // Most visited item API.
|
|
|
| - // Adds |items| to the |most_visited_item_cache_| assigning restricted IDs in
|
| - // the process.
|
| - void AddMostVisitedItems(const std::vector<InstantMostVisitedItem>& items);
|
| -
|
| // Invoked by the InstantController when the Instant page wants to delete a
|
| // Most Visited item.
|
| void DeleteMostVisitedItem(const GURL& url);
|
| @@ -76,11 +60,9 @@ class InstantService : public BrowserContextKeyedService,
|
| // Most Visited deletions.
|
| void UndoAllMostVisitedDeletions();
|
|
|
| - // Returns the last added InstantMostVisitedItems. After the call to
|
| - // |AddMostVisitedItems|, the caller should call this to get the items with
|
| - // the assigned IDs.
|
| + // Returns the last added InstantMostVisitedItems.
|
| void GetCurrentMostVisitedItems(
|
| - std::vector<InstantMostVisitedItemIDPair>* items) const;
|
| + std::vector<InstantMostVisitedItem>* items) const;
|
|
|
| private:
|
| // Overridden from BrowserContextKeyedService:
|
| @@ -91,11 +73,6 @@ class InstantService : public BrowserContextKeyedService,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| - // If the |most_visited_item_id| is found in the cache, sets the |item| to it
|
| - // and returns true.
|
| - bool GetMostVisitedItemForID(InstantRestrictedID most_visited_item_id,
|
| - InstantMostVisitedItem* item) const;
|
| -
|
| // Called when we get new most visited items from the TopNav code,
|
| // registered as an async callback. Parses them and sends them to the renderer
|
| // via SendMostVisitedItems.
|
| @@ -106,8 +83,8 @@ class InstantService : public BrowserContextKeyedService,
|
| // The process ids associated with Instant processes.
|
| std::set<int> process_ids_;
|
|
|
| - // A cache of the InstantMostVisitedItems sent to the Instant Pages.
|
| - InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_item_cache_;
|
| + // InstantMostVisitedItems sent to the Instant Pages.
|
| + std::vector<InstantMostVisitedItem> most_visited_items_;
|
|
|
| content::NotificationRegistrar registrar_;
|
|
|
|
|