Chromium Code Reviews| Index: webkit/glue/plugins/test/plugin_get_javascript_url_test.cc |
| =================================================================== |
| --- webkit/glue/plugins/test/plugin_get_javascript_url_test.cc (revision 2052) |
| +++ webkit/glue/plugins/test/plugin_get_javascript_url_test.cc (working copy) |
| @@ -4,7 +4,6 @@ |
| #include "webkit/glue/plugins/test/plugin_get_javascript_url_test.h" |
| - |
| // url for "self". |
| #define SELF_URL "javascript:window.location+\"\"" |
| // The identifier for the self url stream. |
| @@ -38,7 +37,7 @@ |
| if (stream == NULL) |
| SetError("NewStream got null stream"); |
| - unsigned long stream_id = PtrToUlong(stream->notifyData); |
| + unsigned long stream_id = reinterpret_cast<unsigned long>(stream->notifyData); |
|
Mark Mentovai
2008/09/16 17:53:36
Let's add:
#include "base/basictypes.h"
and:
CO
|
| switch (stream_id) { |
| case SELF_URL_STREAM_ID: |
| break; |
| @@ -60,7 +59,7 @@ |
| if (len < 0 || len > STREAM_CHUNK) |
| SetError("Write got bogus stream chunk size"); |
| - unsigned long stream_id = PtrToUlong(stream->notifyData); |
| + unsigned long stream_id = reinterpret_cast<unsigned long>(stream->notifyData); |
| switch (stream_id) { |
| case SELF_URL_STREAM_ID: |
| self_url_.append(static_cast<char*>(buffer), len); |
| @@ -78,7 +77,7 @@ |
| if (stream == NULL) |
| SetError("NewStream got null stream"); |
| - unsigned long stream_id = PtrToUlong(stream->notifyData); |
| + unsigned long stream_id = reinterpret_cast<unsigned long>(stream->notifyData); |
| switch (stream_id) { |
| case SELF_URL_STREAM_ID: |
| // don't care |
| @@ -91,7 +90,7 @@ |
| } |
| void ExecuteGetJavascriptUrlTest::URLNotify(const char* url, NPReason reason, void* data) { |
| - unsigned long stream_id = PtrToUlong(data); |
| + unsigned long stream_id = reinterpret_cast<unsigned long>(data); |
| switch (stream_id) { |
| case SELF_URL_STREAM_ID: |
| if (strcmp(url, SELF_URL) != 0) |