| Index: chrome/browser/search/instant_io_context.h
|
| diff --git a/chrome/browser/search/instant_io_context.h b/chrome/browser/search/instant_io_context.h
|
| index d061fa8859ed9b0ea3c7a5212738a52e6c2c79aa..658a7c140ed60f5ab69bf0f5d8dce43a9022d388 100644
|
| --- a/chrome/browser/search/instant_io_context.h
|
| +++ b/chrome/browser/search/instant_io_context.h
|
| @@ -44,7 +44,7 @@ class InstantIOContext : public base::RefCountedThreadSafe<InstantIOContext> {
|
| // processes. Used to keep process IDs in sync with InstantService.
|
| static void AddInstantProcessOnIO(
|
| scoped_refptr<InstantIOContext> instant_io_context,
|
| - int process_id);
|
| + int process_id, const GURL& site_url);
|
| static void RemoveInstantProcessOnIO(
|
| scoped_refptr<InstantIOContext> instant_io_context,
|
| int process_id);
|
| @@ -60,6 +60,9 @@ class InstantIOContext : public base::RefCountedThreadSafe<InstantIOContext> {
|
| // process.
|
| static bool ShouldServiceRequest(const net::URLRequest* request);
|
|
|
| + // Returns the expected origin of a request from an Instant process.
|
| + static std::string GetExpectedOrigin(const net::URLRequest* request);
|
| +
|
| // If there is a mapping for the |most_visited_item_id|, sets |url| and
|
| // returns true.
|
| static bool GetURLForMostVisitedItemID(
|
| @@ -77,6 +80,9 @@ class InstantIOContext : public base::RefCountedThreadSafe<InstantIOContext> {
|
| // |process_ids_|.
|
| bool IsInstantProcess(int process_id) const;
|
|
|
| + // Gets the site associated with the given Instant process.
|
| + std::string GetSiteForInstantProcess(int process_id) const;
|
| +
|
| bool GetURLForMostVisitedItemID(InstantRestrictedID most_visited_item_id,
|
| GURL* url) const;
|
|
|
| @@ -85,6 +91,9 @@ class InstantIOContext : public base::RefCountedThreadSafe<InstantIOContext> {
|
| // thread.
|
| std::set<int> process_ids_;
|
|
|
| + // The site URLs associated with Instant processes. See |process_ids_|.
|
| + std::map<int, std::string> process_sites_;
|
| +
|
| // The Most Visited item cache. Mirror of the Most Visited item cache in
|
| // InstantService. Duplicated here for synchronous access on the IO thread.
|
| InstantRestrictedIDCache<InstantMostVisitedItem> most_visited_item_cache_;
|
|
|