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

Unified Diff: chrome/browser/instant/instant_io_context.h

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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/instant/instant_io_context.h
diff --git a/chrome/browser/instant/instant_io_context.h b/chrome/browser/instant/instant_io_context.h
index 26b9a562a9c3ed5b0e1ad6a49d50a68c515acc3f..0d5e6515d159422afd9fb20550fa07020d89254c 100644
--- a/chrome/browser/instant/instant_io_context.h
+++ b/chrome/browser/instant/instant_io_context.h
@@ -18,51 +18,37 @@ namespace net {
class URLRequest;
}
-// IO thread data held for Instant. This reflects the data held in
-// InstantService for use on the IO thread. Owned by ResourceContext
-// as user data.
+// IO thread data held for Instant. This mirrors the data held in InstantService
+// for use on the IO thread. Owned by ResourceContext as user data.
class InstantIOContext : public base::RefCountedThreadSafe<InstantIOContext> {
public:
InstantIOContext();
- // Key name for context UserData. UserData is created by InstantService
- // but accessed by InstantIOContext.
- static const char kInstantIOContextKeyName[];
-
- // Installs the |instant_io_context| into the UserData of the
- // |resource_context|.
- static void SetUserDataOnIO(
- content::ResourceContext* resource_context,
- scoped_refptr<InstantIOContext> instant_io_context);
+ // Installs the |io_context| into the UserData of the |resource_context|.
+ static void SetUserDataOnIO(content::ResourceContext* resource_context,
+ scoped_refptr<InstantIOContext> io_context);
// Add and remove RenderProcessHost IDs that are associated with Instant
- // processes. Used to keep process IDs in sync with InstantService.
- static void AddInstantProcessOnIO(
- scoped_refptr<InstantIOContext> instant_io_context,
- int process_id);
+ // processes. Used to keep process IDs in sync with InstantService.
+ static void AddInstantProcessOnIO(scoped_refptr<InstantIOContext> io_context,
+ int process_id);
static void RemoveInstantProcessOnIO(
- scoped_refptr<InstantIOContext> instant_io_context,
+ scoped_refptr<InstantIOContext> io_context,
int process_id);
- static void ClearInstantProcessesOnIO(
- scoped_refptr<InstantIOContext> instant_io_context);
- // Determine if this chrome-search: request is coming from an Instant render
- // process.
+ // Determine if this chrome-search: request is from an Instant render process.
static bool ShouldServiceRequest(const net::URLRequest* request);
- protected:
- virtual ~InstantIOContext();
-
private:
friend class base::RefCountedThreadSafe<InstantIOContext>;
- // Check that |process_id| is in the known set of Instant processes, ie.
- // |process_ids_|.
+ virtual ~InstantIOContext();
+
+ // Check that |process_id| is in the set of known Instant processes.
bool IsInstantProcess(int process_id) const;
- // The process IDs associated with Instant processes. Mirror of the process
- // IDs in InstantService. Duplicated here for synchronous access on the IO
- // thread.
+ // Process IDs associated with Instant processes. Mirror of the process IDs in
+ // InstantService. Duplicated here for synchronous access on the IO thread.
std::set<int> process_ids_;
DISALLOW_COPY_AND_ASSIGN(InstantIOContext);

Powered by Google App Engine
This is Rietveld 408576698