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

Unified Diff: chrome/browser/renderer_host/web_cache_manager.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « chrome/browser/renderer_host/web_cache_manager.h ('k') | chrome/browser/repost_form_warning_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/web_cache_manager.cc
===================================================================
--- chrome/browser/renderer_host/web_cache_manager.cc (revision 91968)
+++ chrome/browser/renderer_host/web_cache_manager.cc (working copy)
@@ -15,6 +15,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/browser_render_process_host.h"
@@ -63,9 +64,9 @@
WebCacheManager::WebCacheManager()
: global_size_limit_(GetDefaultGlobalSizeLimit()),
ALLOW_THIS_IN_INITIALIZER_LIST(revise_allocation_factory_(this)) {
- registrar_.Add(this, NotificationType::RENDERER_PROCESS_CREATED,
+ registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::RENDERER_PROCESS_TERMINATED,
+ registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
NotificationService::AllSources());
}
@@ -142,7 +143,7 @@
// &stats_details is only valid during the notification.
// See notification_types.h.
NotificationService::current()->Notify(
- NotificationType::WEB_CACHE_STATS_OBSERVED,
+ chrome::NOTIFICATION_WEB_CACHE_STATS_OBSERVED,
Source<RenderProcessHost>(RenderProcessHost::FromID(renderer_id)),
Details<WebCache::UsageStats>(&stats_details));
}
@@ -158,16 +159,16 @@
ClearRendederCache(inactive_renderers_);
}
-void WebCacheManager::Observe(NotificationType type,
+void WebCacheManager::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::RENDERER_PROCESS_CREATED: {
+ switch (type) {
+ case content::NOTIFICATION_RENDERER_PROCESS_CREATED: {
RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
Add(process->id());
break;
}
- case NotificationType::RENDERER_PROCESS_TERMINATED: {
+ case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: {
RenderProcessHost* process = Source<RenderProcessHost>(source).ptr();
Remove(process->id());
break;
« no previous file with comments | « chrome/browser/renderer_host/web_cache_manager.h ('k') | chrome/browser/repost_form_warning_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698