Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: webkit/glue/plugins/pepper_url_request_info.cc

Issue 2800028: Simplfy Pepepr2 bolierplate code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Updated. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/glue/plugins/pepper_url_request_info.cc
diff --git a/webkit/glue/plugins/pepper_url_request_info.cc b/webkit/glue/plugins/pepper_url_request_info.cc
index 9eef1f9a553af5238daa08cd8cef6a84e0d52dea..0f48a7b5fa82e19e9c34814e334677fc1da59a1e 100644
--- a/webkit/glue/plugins/pepper_url_request_info.cc
+++ b/webkit/glue/plugins/pepper_url_request_info.cc
@@ -7,7 +7,6 @@
#include "base/logging.h"
#include "third_party/ppapi/c/pp_var.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
-#include "webkit/glue/plugins/pepper_resource_tracker.h"
#include "webkit/glue/plugins/pepper_string.h"
#include "webkit/glue/plugins/pepper_var.h"
@@ -27,14 +26,14 @@ PP_Resource Create(PP_Module module_id) {
}
bool IsURLRequestInfo(PP_Resource resource) {
- return !!ResourceTracker::Get()->GetAsURLRequestInfo(resource).get();
+ return !!Resource::GetAs<URLRequestInfo>(resource).get();
}
bool SetProperty(PP_Resource request_id,
PP_URLRequestProperty property,
PP_Var var) {
scoped_refptr<URLRequestInfo> request(
- ResourceTracker::Get()->GetAsURLRequestInfo(request_id));
+ Resource::GetAs<URLRequestInfo>(request_id));
if (!request.get())
return false;
@@ -49,7 +48,7 @@ bool SetProperty(PP_Resource request_id,
bool AppendDataToBody(PP_Resource request_id, PP_Var var) {
scoped_refptr<URLRequestInfo> request(
- ResourceTracker::Get()->GetAsURLRequestInfo(request_id));
+ Resource::GetAs<URLRequestInfo>(request_id));
if (!request.get())
return false;

Powered by Google App Engine
This is Rietveld 408576698