summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/audio_renderer_host.cc2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h4
-rw-r--r--chrome/browser/visitedlink_master.cc2
-rw-r--r--chrome/common/command_buffer_messages_internal.h2
-rw-r--r--chrome/common/plugin_messages_internal.h2
-rw-r--r--chrome/common/render_messages.h2
-rw-r--r--chrome/common/render_messages_internal.h4
-rw-r--r--chrome/common/resource_dispatcher_unittest.cc2
-rw-r--r--chrome/plugin/command_buffer_stub.cc2
-rw-r--r--chrome/plugin/command_buffer_stub.h2
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc4
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h4
-rw-r--r--chrome/renderer/command_buffer_proxy.cc2
-rw-r--r--chrome/renderer/mock_printer.cc17
-rw-r--r--chrome/renderer/mock_printer.h24
-rw-r--r--chrome/renderer/mock_render_thread.cc2
-rw-r--r--chrome/renderer/mock_render_thread.h2
-rw-r--r--chrome/renderer/print_web_view_helper_linux.cc2
-rw-r--r--chrome/renderer/print_web_view_helper_mac.mm2
-rw-r--r--chrome/renderer/print_web_view_helper_win.cc2
-rw-r--r--chrome/renderer/renderer_glue.cc2
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc2
23 files changed, 47 insertions, 44 deletions
diff --git a/chrome/browser/renderer_host/audio_renderer_host.cc b/chrome/browser/renderer_host/audio_renderer_host.cc
index d49eac1..4e9c4db 100644
--- a/chrome/browser/renderer_host/audio_renderer_host.cc
+++ b/chrome/browser/renderer_host/audio_renderer_host.cc
@@ -291,7 +291,7 @@ uint32 AudioRendererHost::IPCAudioSource::OnMoreData(AudioOutputStream* stream,
SubmitPacketRequest(&auto_lock);
} else {
// Low latency mode.
- size = std::min(static_cast<uint32>(shared_memory_.max_size()), max_size);
+ size = std::min(shared_memory_.max_size(), max_size);
memcpy(dest, shared_memory_.memory(), size);
memset(shared_memory_.memory(), 0, shared_memory_.max_size());
shared_socket_->Send(&pending_bytes, sizeof(pending_bytes));
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index bb57e60..d5f7a55 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -939,7 +939,7 @@ void ResourceMessageFilter::OnDuplicateSection(
#if defined(OS_MACOSX)
void ResourceMessageFilter::OnAllocateSharedMemoryBuffer(
- size_t buffer_size,
+ uint32 buffer_size,
base::SharedMemoryHandle* handle) {
base::SharedMemory shared_buf;
shared_buf.Create(L"", false, false, buffer_size);
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 240227e..062ac7d 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -248,8 +248,8 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
// Used to ask the browser to allocate a block of shared memory for the
// renderer to send back data in, since shared memory can't be created
// in the renderer on OS X due to the sandbox.
- void OnAllocateSharedMemoryBuffer(size_t buffer_size,
- base::SharedMemoryHandle* handle);
+ void OnAllocateSharedMemoryBuffer(uint32 buffer_size,
+ base::SharedMemoryHandle* handle);
#endif
void OnResourceTypeStats(const WebKit::WebCache::ResourceTypeStats& stats);
diff --git a/chrome/browser/visitedlink_master.cc b/chrome/browser/visitedlink_master.cc
index c2aa3fe..606261f 100644
--- a/chrome/browser/visitedlink_master.cc
+++ b/chrome/browser/visitedlink_master.cc
@@ -666,7 +666,7 @@ bool VisitedLinkMaster::GetDatabaseFileName(FilePath* filename) {
// in so that it can be written to the shared memory
bool VisitedLinkMaster::CreateURLTable(int32 num_entries, bool init_to_empty) {
// The table is the size of the table followed by the entries.
- int32 alloc_size = num_entries * sizeof(Fingerprint) + sizeof(SharedHeader);
+ uint32 alloc_size = num_entries * sizeof(Fingerprint) + sizeof(SharedHeader);
// Create the shared memory object.
shared_memory_ = new base::SharedMemory();
diff --git a/chrome/common/command_buffer_messages_internal.h b/chrome/common/command_buffer_messages_internal.h
index 0969f1c..6d08dd3 100644
--- a/chrome/common/command_buffer_messages_internal.h
+++ b/chrome/common/command_buffer_messages_internal.h
@@ -53,7 +53,7 @@ IPC_BEGIN_MESSAGES(CommandBuffer)
IPC_SYNC_MESSAGE_ROUTED1_2(CommandBufferMsg_GetTransferBuffer,
int32 /* id */,
base::SharedMemoryHandle /* transfer_buffer */,
- size_t /* size */)
+ uint32 /* size */)
#if defined(OS_MACOSX)
// On Mac OS X the GPU plugin must be offscreen, because there is no
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index b5908a8..66df30b 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -204,7 +204,7 @@ IPC_BEGIN_MESSAGES(Plugin)
IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_Print,
base::SharedMemoryHandle /* shared_memory*/,
- size_t /* size */)
+ uint32 /* size */)
IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject,
int /* route_id */)
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 008e53e..07b91a9 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -413,7 +413,7 @@ struct ViewHostMsg_DidPrintPage_Params {
base::SharedMemoryHandle metafile_data_handle;
// Size of the metafile data.
- unsigned data_size;
+ uint32 data_size;
// Cookie for the document to ensure correctness.
int document_cookie;
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 90500d1..8aef0f0 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -1636,12 +1636,12 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Asks the browser to create a block of shared memory for the renderer to pass
// NativeMetafile data to the browser.
IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_AllocatePDFTransport,
- size_t /* buffer size */,
+ uint32 /* buffer size */,
base::SharedMemoryHandle /* browser handle */)
// Asks the browser to create a block of shared memory for the renderer to
// fill in and pass back to the browser.
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_AllocateSharedMemoryBuffer,
- size_t /* buffer size */,
+ uint32 /* buffer size */,
base::SharedMemoryHandle /* browser handle */)
#endif
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc
index df658c0..d65abbe 100644
--- a/chrome/common/resource_dispatcher_unittest.cc
+++ b/chrome/common/resource_dispatcher_unittest.cc
@@ -24,7 +24,7 @@ static const char test_page_mime_type[] = "text/html";
static const char test_page_charset[] = "";
static const char test_page_contents[] =
"<html><head><title>Google</title></head><body><h1>Google</h1></body></html>";
-static const int test_page_contents_len = arraysize(test_page_contents) - 1;
+static const uint32 test_page_contents_len = arraysize(test_page_contents) - 1;
// Listens for request response data and stores it so that it can be compared
// to the reference data.
diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc
index 9e80b14..09f4cdb 100644
--- a/chrome/plugin/command_buffer_stub.cc
+++ b/chrome/plugin/command_buffer_stub.cc
@@ -127,7 +127,7 @@ void CommandBufferStub::OnDestroyTransferBuffer(int32 id) {
void CommandBufferStub::OnGetTransferBuffer(
int32 id,
base::SharedMemoryHandle* transfer_buffer,
- size_t* size) {
+ uint32* size) {
*transfer_buffer = base::SharedMemoryHandle();
*size = 0;
diff --git a/chrome/plugin/command_buffer_stub.h b/chrome/plugin/command_buffer_stub.h
index 539e241..f0d8ac0 100644
--- a/chrome/plugin/command_buffer_stub.h
+++ b/chrome/plugin/command_buffer_stub.h
@@ -48,7 +48,7 @@ class CommandBufferStub : public IPC::Channel::Listener,
void OnDestroyTransferBuffer(int32 id);
void OnGetTransferBuffer(int32 id,
base::SharedMemoryHandle* transfer_buffer,
- size_t* size);
+ uint32* size);
#if defined(OS_MACOSX)
void OnSetWindowSize(int32 width, int32 height);
void SwapBuffersCallback();
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index a24f7fa..7654058 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -278,7 +278,7 @@ void WebPluginDelegateStub::OnDidPaint() {
}
void WebPluginDelegateStub::OnPrint(base::SharedMemoryHandle* shared_memory,
- size_t* size) {
+ uint32* size) {
#if defined(OS_WIN)
printing::NativeMetafile metafile;
if (!metafile.CreateDc(NULL, NULL)) {
@@ -407,7 +407,7 @@ void WebPluginDelegateStub::OnCreateCommandBuffer(int* route_id) {
}
void WebPluginDelegateStub::CreateSharedBuffer(
- size_t size,
+ uint32 size,
base::SharedMemory* shared_buf,
base::SharedMemoryHandle* remote_handle) {
if (!shared_buf->Create(std::wstring(), false, false, size)) {
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index efe93c10..36fda08 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -70,7 +70,7 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
bool* handled, WebCursor* cursor);
void OnPaint(const gfx::Rect& damaged_rect);
void OnDidPaint();
- void OnPrint(base::SharedMemoryHandle* shared_memory, size_t* size);
+ void OnPrint(base::SharedMemoryHandle* shared_memory, uint32* size);
void OnUpdateGeometry(const PluginMsg_UpdateGeometry_Param& param);
void OnGetPluginScriptableObject(int* route_id);
void OnSendJavaScriptStream(const GURL& url,
@@ -98,7 +98,7 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
int notify_id);
void OnHTTPRangeRequestReply(unsigned long resource_id, int range_request_id);
void OnCreateCommandBuffer(int* route_id);
- void CreateSharedBuffer(size_t size,
+ void CreateSharedBuffer(uint32 size,
base::SharedMemory* shared_buf,
base::SharedMemoryHandle* remote_handle);
diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc
index f1651db..2b71fa8 100644
--- a/chrome/renderer/command_buffer_proxy.cc
+++ b/chrome/renderer/command_buffer_proxy.cc
@@ -133,7 +133,7 @@ Buffer CommandBufferProxy::GetTransferBuffer(int32 id) {
// Assuming we are in the renderer process, the service is responsible for
// duplicating the handle. This might not be true for NaCl.
base::SharedMemoryHandle handle;
- size_t size;
+ uint32 size;
if (!Send(new CommandBufferMsg_GetTransferBuffer(route_id_,
id,
&handle,
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc
index e8fbac0..235e056 100644
--- a/chrome/renderer/mock_printer.cc
+++ b/chrome/renderer/mock_printer.cc
@@ -145,43 +145,46 @@ int MockPrinter::GetPrintedPages() const {
return page_number_;
}
-const MockPrinterPage* MockPrinter::GetPrintedPage(size_t pageno) const {
+const MockPrinterPage* MockPrinter::GetPrintedPage(unsigned int pageno) const {
if (pages_.size() > pageno)
return pages_[pageno];
else
return NULL;
}
-int MockPrinter::GetWidth(size_t page) const {
+int MockPrinter::GetWidth(unsigned int page) const {
if (printer_status_ != PRINTER_READY || page >= pages_.size())
return -1;
return pages_[page]->width();
}
-int MockPrinter::GetHeight(size_t page) const {
+int MockPrinter::GetHeight(unsigned int page) const {
if (printer_status_ != PRINTER_READY || page >= pages_.size())
return -1;
return pages_[page]->height();
}
-bool MockPrinter::GetBitmapChecksum(size_t page, std::string* checksum) const {
+bool MockPrinter::GetBitmapChecksum(
+ unsigned int page, std::string* checksum) const {
if (printer_status_ != PRINTER_READY || page >= pages_.size())
return false;
*checksum = pages_[page]->image().checksum();
return true;
}
-bool MockPrinter::SaveSource(size_t page, const FilePath& filepath) const {
+bool MockPrinter::SaveSource(
+ unsigned int page, const FilePath& filepath) const {
if (printer_status_ != PRINTER_READY || page >= pages_.size())
return false;
const uint8* source_data = pages_[page]->source_data();
- size_t source_size = pages_[page]->source_size();
+ uint32 source_size = pages_[page]->source_size();
file_util::WriteFile(filepath, reinterpret_cast<const char*>(source_data),
source_size);
return true;
}
-bool MockPrinter::SaveBitmap(size_t page, const FilePath& filepath) const {
+bool MockPrinter::SaveBitmap(
+ unsigned int page, const FilePath& filepath) const {
if (printer_status_ != PRINTER_READY || page >= pages_.size())
return false;
diff --git a/chrome/renderer/mock_printer.h b/chrome/renderer/mock_printer.h
index 80f6c4b..c97f149 100644
--- a/chrome/renderer/mock_printer.h
+++ b/chrome/renderer/mock_printer.h
@@ -24,7 +24,7 @@ struct ViewHostMsg_DidPrintPage_Params;
class MockPrinterPage : public base::RefCounted<MockPrinterPage> {
public:
MockPrinterPage(const void* source_data,
- size_t source_size,
+ uint32 source_size,
const printing::Image& image)
: source_size_(source_size),
image_(image) {
@@ -40,11 +40,11 @@ class MockPrinterPage : public base::RefCounted<MockPrinterPage> {
int width() const { return image_.size().width(); }
int height() const { return image_.size().height(); }
const uint8* source_data() const { return source_data_.get(); }
- const size_t source_size() const { return source_size_; }
+ const uint32 source_size() const { return source_size_; }
const printing::Image& image() const { return image_; }
private:
- size_t source_size_;
+ uint32 source_size_;
scoped_array<uint8> source_data_;
printing::Image image_;
@@ -89,19 +89,19 @@ class MockPrinter {
// Get a pointer to the printed page, returns NULL if pageno has not been
// printed. The pointer is for read only view and should not be deleted.
- const MockPrinterPage* GetPrintedPage(size_t pageno) const;
+ const MockPrinterPage* GetPrintedPage(unsigned int pageno) const;
- int GetWidth(size_t page) const;
- int GetHeight(size_t page) const;
- bool GetBitmapChecksum(size_t page, std::string* checksum) const;
- bool GetSource(size_t page, const void** data, size_t* size) const;
- bool GetBitmap(size_t page, const void** data, size_t* size) const;
- bool SaveSource(size_t page, const FilePath& filepath) const;
- bool SaveBitmap(size_t page, const FilePath& filepath) const;
+ int GetWidth(unsigned int page) const;
+ int GetHeight(unsigned int page) const;
+ bool GetBitmapChecksum(unsigned int page, std::string* checksum) const;
+ bool GetSource(unsigned int page, const void** data, uint32* size) const;
+ bool GetBitmap(unsigned int page, const void** data, uint32* size) const;
+ bool SaveSource(unsigned int page, const FilePath& filepath) const;
+ bool SaveBitmap(unsigned int page, const FilePath& filepath) const;
protected:
int CreateDocumentCookie();
- bool GetChecksum(const void* data, size_t size, std::string* checksum) const;
+ bool GetChecksum(const void* data, uint32 size, std::string* checksum) const;
private:
// In pixels according to dpi_x and dpi_y.
diff --git a/chrome/renderer/mock_render_thread.cc b/chrome/renderer/mock_render_thread.cc
index bcb1517..1fa513f 100644
--- a/chrome/renderer/mock_render_thread.cc
+++ b/chrome/renderer/mock_render_thread.cc
@@ -122,7 +122,7 @@ void MockRenderThread::OnDuplicateSection(
#if defined(OS_MACOSX)
void MockRenderThread::OnAllocatePDFTransport(
- size_t buffer_size, base::SharedMemoryHandle* handle) {
+ uint32 buffer_size, base::SharedMemoryHandle* handle) {
base::SharedMemory shared_buf;
shared_buf.Create(L"", false, false, buffer_size);
if (!shared_buf.Map(buffer_size)) {
diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h
index d4ed9f7..4f3b1d9 100644
--- a/chrome/renderer/mock_render_thread.h
+++ b/chrome/renderer/mock_render_thread.h
@@ -93,7 +93,7 @@ class MockRenderThread : public RenderThreadBase {
#endif
#if defined(OS_MACOSX)
- void OnAllocatePDFTransport(size_t buffer_size,
+ void OnAllocatePDFTransport(uint32 buffer_size,
base::SharedMemoryHandle* handle);
#endif
diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc
index 4b2f92f..415bf1d 100644
--- a/chrome/renderer/print_web_view_helper_linux.cc
+++ b/chrome/renderer/print_web_view_helper_linux.cc
@@ -80,7 +80,7 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params,
metafile.Close();
// Get the size of the resulting metafile.
- unsigned int buf_size = metafile.GetDataSize();
+ uint32 buf_size = metafile.GetDataSize();
DCHECK_GT(buf_size, 0u);
base::FileDescriptor fd;
diff --git a/chrome/renderer/print_web_view_helper_mac.mm b/chrome/renderer/print_web_view_helper_mac.mm
index ae579bb..6e2cc2d 100644
--- a/chrome/renderer/print_web_view_helper_mac.mm
+++ b/chrome/renderer/print_web_view_helper_mac.mm
@@ -207,7 +207,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
base::SharedMemory shared_buf;
// Ask the browser to create the shared memory for us.
- unsigned int buf_size = metafile.GetDataSize();
+ uint32 buf_size = metafile.GetDataSize();
base::SharedMemoryHandle shared_mem_handle;
if (Send(new ViewHostMsg_AllocatePDFTransport(routing_id(), buf_size,
&shared_mem_handle))) {
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc
index 1d9d595..6ba70a3 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -244,7 +244,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params,
}
// Get the size of the compiled metafile.
- unsigned buf_size = metafile.GetDataSize();
+ uint32 buf_size = metafile.GetDataSize();
DCHECK_GT(buf_size, 128u);
ViewHostMsg_DidPrintPage_Params page_params;
page_params.data_size = 0;
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 8b5d3fd..e4f8dd9 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -90,7 +90,7 @@ void ScopedClipboardWriterGlue::WriteBitmapFromPixels(const void* pixels,
if (shared_buf_)
return;
- size_t buf_size = 4 * size.width() * size.height();
+ uint32 buf_size = 4 * size.width() * size.height();
// Allocate a shared memory buffer to hold the bitmap bits.
#if defined(OS_MACOSX)
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 6747ef0..178f07f 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -805,7 +805,7 @@ bool WebPluginDelegateProxy::BackgroundChanged(
void WebPluginDelegateProxy::Print(gfx::NativeDrawingContext context) {
base::SharedMemoryHandle shared_memory;
- size_t size;
+ uint32 size;
if (!Send(new PluginMsg_Print(instance_id_, &shared_memory, &size)))
return;