| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/appcache/appcache_backend_proxy.h" | 5 #include "content/common/appcache/appcache_backend_proxy.h" |
| 6 | 6 |
| 7 #include "chrome/common/render_messages.h" | 7 #include "content/common/appcache_messages.h" |
| 8 | 8 |
| 9 void AppCacheBackendProxy::RegisterHost(int host_id) { | 9 void AppCacheBackendProxy::RegisterHost(int host_id) { |
| 10 sender_->Send(new AppCacheMsg_RegisterHost(host_id)); | 10 sender_->Send(new AppCacheHostMsg_RegisterHost(host_id)); |
| 11 } | 11 } |
| 12 | 12 |
| 13 void AppCacheBackendProxy::UnregisterHost(int host_id) { | 13 void AppCacheBackendProxy::UnregisterHost(int host_id) { |
| 14 sender_->Send(new AppCacheMsg_UnregisterHost(host_id)); | 14 sender_->Send(new AppCacheHostMsg_UnregisterHost(host_id)); |
| 15 } | 15 } |
| 16 | 16 |
| 17 void AppCacheBackendProxy::SelectCache( | 17 void AppCacheBackendProxy::SelectCache( |
| 18 int host_id, | 18 int host_id, |
| 19 const GURL& document_url, | 19 const GURL& document_url, |
| 20 const int64 cache_document_was_loaded_from, | 20 const int64 cache_document_was_loaded_from, |
| 21 const GURL& manifest_url) { | 21 const GURL& manifest_url) { |
| 22 sender_->Send(new AppCacheMsg_SelectCache( | 22 sender_->Send(new AppCacheHostMsg_SelectCache( |
| 23 host_id, document_url, | 23 host_id, document_url, |
| 24 cache_document_was_loaded_from, | 24 cache_document_was_loaded_from, |
| 25 manifest_url)); | 25 manifest_url)); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void AppCacheBackendProxy::SelectCacheForWorker( | 28 void AppCacheBackendProxy::SelectCacheForWorker( |
| 29 int host_id, int parent_process_id, int parent_host_id) { | 29 int host_id, int parent_process_id, int parent_host_id) { |
| 30 sender_->Send(new AppCacheMsg_SelectCacheForWorker( | 30 sender_->Send(new AppCacheHostMsg_SelectCacheForWorker( |
| 31 host_id, parent_process_id, | 31 host_id, parent_process_id, |
| 32 parent_host_id)); | 32 parent_host_id)); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void AppCacheBackendProxy::SelectCacheForSharedWorker( | 35 void AppCacheBackendProxy::SelectCacheForSharedWorker( |
| 36 int host_id, int64 appcache_id) { | 36 int host_id, int64 appcache_id) { |
| 37 sender_->Send(new AppCacheMsg_SelectCacheForSharedWorker( | 37 sender_->Send(new AppCacheHostMsg_SelectCacheForSharedWorker( |
| 38 host_id, appcache_id)); | 38 host_id, appcache_id)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void AppCacheBackendProxy::MarkAsForeignEntry( | 41 void AppCacheBackendProxy::MarkAsForeignEntry( |
| 42 int host_id, const GURL& document_url, | 42 int host_id, const GURL& document_url, |
| 43 int64 cache_document_was_loaded_from) { | 43 int64 cache_document_was_loaded_from) { |
| 44 sender_->Send(new AppCacheMsg_MarkAsForeignEntry( | 44 sender_->Send(new AppCacheHostMsg_MarkAsForeignEntry( |
| 45 host_id, document_url, | 45 host_id, document_url, |
| 46 cache_document_was_loaded_from)); | 46 cache_document_was_loaded_from)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 appcache::Status AppCacheBackendProxy::GetStatus(int host_id) { | 49 appcache::Status AppCacheBackendProxy::GetStatus(int host_id) { |
| 50 appcache::Status status = appcache::UNCACHED; | 50 appcache::Status status = appcache::UNCACHED; |
| 51 sender_->Send(new AppCacheMsg_GetStatus(host_id, &status)); | 51 sender_->Send(new AppCacheHostMsg_GetStatus(host_id, &status)); |
| 52 return status; | 52 return status; |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool AppCacheBackendProxy::StartUpdate(int host_id) { | 55 bool AppCacheBackendProxy::StartUpdate(int host_id) { |
| 56 bool result = false; | 56 bool result = false; |
| 57 sender_->Send(new AppCacheMsg_StartUpdate(host_id, &result)); | 57 sender_->Send(new AppCacheHostMsg_StartUpdate(host_id, &result)); |
| 58 return result; | 58 return result; |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool AppCacheBackendProxy::SwapCache(int host_id) { | 61 bool AppCacheBackendProxy::SwapCache(int host_id) { |
| 62 bool result = false; | 62 bool result = false; |
| 63 sender_->Send(new AppCacheMsg_SwapCache(host_id, &result)); | 63 sender_->Send(new AppCacheHostMsg_SwapCache(host_id, &result)); |
| 64 return result; | 64 return result; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void AppCacheBackendProxy::GetResourceList( | 67 void AppCacheBackendProxy::GetResourceList( |
| 68 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { | 68 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { |
| 69 sender_->Send(new AppCacheMsg_GetResourceList(host_id, resource_infos)); | 69 sender_->Send(new AppCacheHostMsg_GetResourceList(host_id, resource_infos)); |
| 70 } | 70 } |
| OLD | NEW |