| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
| 6 | 6 |
| 7 #if defined(USE_SYSTEM_SQLITE) | 7 #if defined(USE_SYSTEM_SQLITE) |
| 8 #include <sqlite3.h> | 8 #include <sqlite3.h> |
| 9 #else | 9 #else |
| 10 #include "third_party/sqlite/preprocessed/sqlite3.h" | 10 #include "third_party/sqlite/preprocessed/sqlite3.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 if (RenderThread::current()->Send( | 91 if (RenderThread::current()->Send( |
| 92 new ViewHostMsg_GetFileSize(webkit_glue::WebStringToFilePath(path), | 92 new ViewHostMsg_GetFileSize(webkit_glue::WebStringToFilePath(path), |
| 93 reinterpret_cast<int64*>(&result)))) { | 93 reinterpret_cast<int64*>(&result)))) { |
| 94 return result >= 0; | 94 return result >= 0; |
| 95 } | 95 } |
| 96 | 96 |
| 97 result = -1; | 97 result = -1; |
| 98 return false; | 98 return false; |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool RendererWebKitClientImpl::getFileModificationTime( |
| 102 const WebKit::WebString& path, |
| 103 double& result) { |
| 104 base::Time time; |
| 105 if (RenderThread::current()->Send( |
| 106 new ViewHostMsg_GetFileModificationTime( |
| 107 webkit_glue::WebStringToFilePath(path), &time))) { |
| 108 result = time.ToDoubleT(); |
| 109 return true; |
| 110 } |
| 111 |
| 112 result = 0; |
| 113 return false; |
| 114 } |
| 115 |
| 101 unsigned long long RendererWebKitClientImpl::visitedLinkHash( | 116 unsigned long long RendererWebKitClientImpl::visitedLinkHash( |
| 102 const char* canonical_url, | 117 const char* canonical_url, |
| 103 size_t length) { | 118 size_t length) { |
| 104 return RenderThread::current()->visited_link_slave()->ComputeURLFingerprint( | 119 return RenderThread::current()->visited_link_slave()->ComputeURLFingerprint( |
| 105 canonical_url, length); | 120 canonical_url, length); |
| 106 } | 121 } |
| 107 | 122 |
| 108 bool RendererWebKitClientImpl::isLinkVisited(unsigned long long link_hash) { | 123 bool RendererWebKitClientImpl::isLinkVisited(unsigned long long link_hash) { |
| 109 return RenderThread::current()->visited_link_slave()->IsVisited(link_hash); | 124 return RenderThread::current()->visited_link_slave()->IsVisited(link_hash); |
| 110 } | 125 } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 const WebKit::WebString& challenge, | 346 const WebKit::WebString& challenge, |
| 332 const WebKit::WebURL& url) { | 347 const WebKit::WebURL& url) { |
| 333 std::string signed_public_key; | 348 std::string signed_public_key; |
| 334 RenderThread::current()->Send(new ViewHostMsg_Keygen( | 349 RenderThread::current()->Send(new ViewHostMsg_Keygen( |
| 335 static_cast<uint32>(key_size_index), | 350 static_cast<uint32>(key_size_index), |
| 336 challenge.utf8(), | 351 challenge.utf8(), |
| 337 GURL(url), | 352 GURL(url), |
| 338 &signed_public_key)); | 353 &signed_public_key)); |
| 339 return WebString::fromUTF8(signed_public_key); | 354 return WebString::fromUTF8(signed_public_key); |
| 340 } | 355 } |
| OLD | NEW |