summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 06:27:47 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-19 06:27:47 +0000
commit2c434b3ebbf5deb5f225ac375da9be89c9683c76 (patch)
treefe7adcb3f446417bed170d3334a2423d2072db21 /chrome/common
parent2d24533e33dca38c64e2a4ec2480eb59b6ef34b6 (diff)
downloadchromium_src-2c434b3ebbf5deb5f225ac375da9be89c9683c76.zip
chromium_src-2c434b3ebbf5deb5f225ac375da9be89c9683c76.tar.gz
chromium_src-2c434b3ebbf5deb5f225ac375da9be89c9683c76.tar.bz2
Chrome-side of moving webkit/glue/cache_manager.{h,cc} to the WebKit API layer.
This also includes a change to not have third_party/WebKit/WebKit/chromium/public in the global include path. Most of the code changes pertain to this. I also took this opportunity to do some renaming: browser/cache_manager_host -> browser/renderer_host/web_cache_manager R=brettw Review URL: http://codereview.chromium.org/42194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/ipc_message_utils.h54
-rw-r--r--chrome/common/render_messages.h80
-rw-r--r--chrome/common/render_messages_internal.h4
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc1
-rw-r--r--chrome/common/temp_scaffolding_stubs.h1
5 files changed, 68 insertions, 72 deletions
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index 64ca212..e016074 100644
--- a/chrome/common/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -19,7 +19,6 @@
#include "chrome/common/ipc_sync_message.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/transport_dib.h"
-#include "webkit/glue/cache_manager.h"
#include "webkit/glue/console_message_level.h"
#include "webkit/glue/find_in_page_request.h"
#include "webkit/glue/webcursor.h"
@@ -808,59 +807,6 @@ struct ParamTraits<ConsoleMessageLevel> {
}
};
-template <>
-struct ParamTraits<CacheManager::ResourceTypeStat> {
- typedef CacheManager::ResourceTypeStat param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.count);
- WriteParam(m, p.size);
- WriteParam(m, p.live_size);
- WriteParam(m, p.decoded_size);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- bool result =
- ReadParam(m, iter, &r->count) &&
- ReadParam(m, iter, &r->size) &&
- ReadParam(m, iter, &r->live_size) &&
- ReadParam(m, iter, &r->decoded_size);
- return result;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(StringPrintf(L"%d %d %d %d", p.count, p.size, p.live_size,
- p.decoded_size));
- }
-};
-
-template <>
-struct ParamTraits<CacheManager::ResourceTypeStats> {
- typedef CacheManager::ResourceTypeStats param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.images);
- WriteParam(m, p.css_stylesheets);
- WriteParam(m, p.scripts);
- WriteParam(m, p.xsl_stylesheets);
- WriteParam(m, p.fonts);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- bool result =
- ReadParam(m, iter, &r->images) &&
- ReadParam(m, iter, &r->css_stylesheets) &&
- ReadParam(m, iter, &r->scripts) &&
- ReadParam(m, iter, &r->xsl_stylesheets) &&
- ReadParam(m, iter, &r->fonts);
- return result;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<WebCoreStats>");
- LogParam(p.images, l);
- LogParam(p.css_stylesheets, l);
- LogParam(p.scripts, l);
- LogParam(p.xsl_stylesheets, l);
- LogParam(p.fonts, l);
- l->append(L"</WebCoreStats>");
- }
-};
-
#if defined(OS_WIN)
template <>
struct ParamTraits<XFORM> {
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index ebac85c..0053921 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -25,8 +25,8 @@
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_status.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#include "webkit/glue/autofill_form.h"
-#include "webkit/glue/cache_manager.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/feed.h"
#include "webkit/glue/form_data.h"
@@ -1165,27 +1165,80 @@ struct ParamTraits<net::UploadData::Element> {
}
};
-// Traits for CacheManager::UsageStats
+// Traits for WebKit::WebCache::UsageStats
template <>
-struct ParamTraits<CacheManager::UsageStats> {
- typedef CacheManager::UsageStats param_type;
+struct ParamTraits<WebKit::WebCache::UsageStats> {
+ typedef WebKit::WebCache::UsageStats param_type;
static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.min_dead_capacity);
- WriteParam(m, p.max_dead_capacity);
+ WriteParam(m, p.minDeadCapacity);
+ WriteParam(m, p.maxDeadCapacity);
WriteParam(m, p.capacity);
- WriteParam(m, p.live_size);
- WriteParam(m, p.dead_size);
+ WriteParam(m, p.liveSize);
+ WriteParam(m, p.deadSize);
}
static bool Read(const Message* m, void** iter, param_type* r) {
return
- ReadParam(m, iter, &r->min_dead_capacity) &&
- ReadParam(m, iter, &r->max_dead_capacity) &&
+ ReadParam(m, iter, &r->minDeadCapacity) &&
+ ReadParam(m, iter, &r->maxDeadCapacity) &&
ReadParam(m, iter, &r->capacity) &&
- ReadParam(m, iter, &r->live_size) &&
- ReadParam(m, iter, &r->dead_size);
+ ReadParam(m, iter, &r->liveSize) &&
+ ReadParam(m, iter, &r->deadSize);
}
static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<CacheManager::UsageStats>");
+ l->append(L"<WebCache::UsageStats>");
+ }
+};
+
+template <>
+struct ParamTraits<WebKit::WebCache::ResourceTypeStat> {
+ typedef WebKit::WebCache::ResourceTypeStat param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.count);
+ WriteParam(m, p.size);
+ WriteParam(m, p.liveSize);
+ WriteParam(m, p.decodedSize);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool result =
+ ReadParam(m, iter, &r->count) &&
+ ReadParam(m, iter, &r->size) &&
+ ReadParam(m, iter, &r->liveSize) &&
+ ReadParam(m, iter, &r->decodedSize);
+ return result;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"%d %d %d %d", p.count, p.size, p.liveSize,
+ p.decodedSize));
+ }
+};
+
+template <>
+struct ParamTraits<WebKit::WebCache::ResourceTypeStats> {
+ typedef WebKit::WebCache::ResourceTypeStats param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.images);
+ WriteParam(m, p.cssStyleSheets);
+ WriteParam(m, p.scripts);
+ WriteParam(m, p.xslStyleSheets);
+ WriteParam(m, p.fonts);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool result =
+ ReadParam(m, iter, &r->images) &&
+ ReadParam(m, iter, &r->cssStyleSheets) &&
+ ReadParam(m, iter, &r->scripts) &&
+ ReadParam(m, iter, &r->xslStyleSheets) &&
+ ReadParam(m, iter, &r->fonts);
+ return result;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<WebCoreStats>");
+ LogParam(p.images, l);
+ LogParam(p.cssStyleSheets, l);
+ LogParam(p.scripts, l);
+ LogParam(p.xslStyleSheets, l);
+ LogParam(p.fonts, l);
+ l->append(L"</WebCoreStats>");
}
};
@@ -1833,7 +1886,6 @@ struct ParamTraits<AudioOutputStream::State> {
}
};
-
} // namespace IPC
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index dedf4774..4d8c9a9 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -569,7 +569,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
- CacheManager::UsageStats /* stats */)
+ WebKit::WebCache::UsageStats /* stats */)
// Indicates the renderer is ready in response to a ViewMsg_New or
// a ViewMsg_CreatingNew_ACK.
@@ -1132,7 +1132,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Provide the browser process with information about the WebCore resource
// cache.
IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
- CacheManager::ResourceTypeStats)
+ WebKit::WebCache::ResourceTypeStats)
// Notify the browser that this render either has or doesn't have a
// beforeunload or unload handler.
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 93c7064..4690499 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_shutdown.h"
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/debugger/debugger_shell.h"
#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/download/download_request_dialog_delegate.h"
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 5037b50..c1a12e5 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -23,7 +23,6 @@
#include "base/gfx/rect.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/download/save_types.h"