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

Unified Diff: chrome/browser/instant/instant_service.cc

Issue 12087129: Move kChromeSearchScheme out of content since it's a chrome feature. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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_service.cc
===================================================================
--- chrome/browser/instant/instant_service.cc (revision 180071)
+++ chrome/browser/instant/instant_service.cc (working copy)
@@ -4,7 +4,14 @@
#include "chrome/browser/instant/instant_service.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/notification_types.h"
+#include "content/public/browser/render_process_host.h"
+
InstantService::InstantService() {
+ registrar_.Add(this,
+ content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
+ content::NotificationService::AllSources());
}
InstantService::~InstantService() {
@@ -14,10 +21,6 @@
process_ids_.insert(process_id);
}
-void InstantService::RemoveInstantProcess(int process_id) {
- process_ids_.erase(process_id);
-}
-
bool InstantService::IsInstantProcess(int process_id) const {
return process_ids_.count(process_id) != 0;
}
@@ -29,3 +32,10 @@
void InstantService::Shutdown() {
process_ids_.clear();
}
+
+void InstantService::Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ int process_id = content::Source<content::RenderProcessHost>(source)->GetID();
+ process_ids_.erase(process_id);
+}

Powered by Google App Engine
This is Rietveld 408576698