OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 return &sandbox_support_; | 44 return &sandbox_support_; |
45 #else | 45 #else |
46 return NULL; | 46 return NULL; |
47 #endif | 47 #endif |
48 } | 48 } |
49 | 49 |
50 bool RendererWebKitClientImpl::getFileSize(const WebString& path, | 50 bool RendererWebKitClientImpl::getFileSize(const WebString& path, |
51 long long& result) { | 51 long long& result) { |
52 if (RenderThread::current()->Send(new ViewHostMsg_GetFileSize( | 52 if (RenderThread::current()->Send(new ViewHostMsg_GetFileSize( |
53 FilePath(webkit_glue::WebStringToFilePathString(path)), | 53 FilePath(webkit_glue::WebStringToFilePathString(path)), |
54 &result))) { | 54 reinterpret_cast<int64*>(&result)))) { |
Evan Martin
2009/07/28 21:15:29
this is scary looking, that you're casting a refer
| |
55 return result >= 0; | 55 return result >= 0; |
56 } else { | 56 } else { |
57 result = -1; | 57 result = -1; |
58 return false; | 58 return false; |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 unsigned long long RendererWebKitClientImpl::visitedLinkHash( | 62 unsigned long long RendererWebKitClientImpl::visitedLinkHash( |
63 const char* canonical_url, | 63 const char* canonical_url, |
64 size_t length) { | 64 size_t length) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 long long RendererWebKitClientImpl::databaseGetFileSize( | 233 long long RendererWebKitClientImpl::databaseGetFileSize( |
234 const WebString& file_name) { | 234 const WebString& file_name) { |
235 DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance(); | 235 DBMessageFilter* db_message_filter = DBMessageFilter::GetInstance(); |
236 int message_id = db_message_filter->GetUniqueID(); | 236 int message_id = db_message_filter->GetUniqueID(); |
237 return db_message_filter->SendAndWait( | 237 return db_message_filter->SendAndWait( |
238 new ViewHostMsg_DatabaseGetFileSize( | 238 new ViewHostMsg_DatabaseGetFileSize( |
239 FilePath(webkit_glue::WebStringToFilePathString(file_name)), | 239 FilePath(webkit_glue::WebStringToFilePathString(file_name)), |
240 message_id), | 240 message_id), |
241 message_id, 0LL); | 241 message_id, 0LL); |
242 } | 242 } |
OLD | NEW |