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

Unified Diff: content/browser/renderer_host/pepper/pepper_message_filter.cc

Issue 10909138: Convert the async device ID getter to a chrome resource host (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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: content/browser/renderer_host/pepper/pepper_message_filter.cc
diff --git a/content/browser/renderer_host/pepper/pepper_message_filter.cc b/content/browser/renderer_host/pepper/pepper_message_filter.cc
index 04cfc16162b6aaf2b9d6d572790458279f349618..6abd528cbfa54ddf36b290a12c814a9c700df673 100644
--- a/content/browser/renderer_host/pepper/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_message_filter.cc
@@ -65,6 +65,8 @@ const int kDRMIdentifierSize = (256 / 8) * 2;
// The path to the file containing the DRM ID.
// It is mirrored from
// chrome/browser/chromeos/system/drm_settings.cc
+// TODO(brettw) remove this when we remove the sync Device ID getter in
+// preference for the async one.
const char kDRMIdentifierFile[] = "Pepper DRM ID.0";
} // namespace
@@ -107,8 +109,7 @@ void PepperMessageFilter::OverrideThreadForMessage(
message.type() == PpapiHostMsg_PPBTCPServerSocket_Listen::ID ||
message.type() == PpapiHostMsg_PPBHostResolver_Resolve::ID) {
*thread = BrowserThread::UI;
- } else if (message.type() == PepperMsg_GetDeviceID::ID ||
- message.type() == PpapiHostMsg_PPBFlashDeviceID_Get::ID) {
+ } else if (message.type() == PepperMsg_GetDeviceID::ID) {
*thread = BrowserThread::FILE;
}
}
@@ -166,7 +167,6 @@ bool PepperMessageFilter::OnMessageReceived(const IPC::Message& msg,
// Flash messages.
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_UpdateActivity, OnUpdateActivity)
IPC_MESSAGE_HANDLER(PepperMsg_GetDeviceID, OnGetDeviceID)
- IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashDeviceID_Get, OnGetDeviceIDAsync)
IPC_MESSAGE_HANDLER(PepperMsg_GetLocalDataRestrictions,
OnGetLocalDataRestrictions)
@@ -686,6 +686,8 @@ void PepperMessageFilter::OnUpdateActivity() {
#endif
}
+// TODO(brettw) remove this when we remove the sync Device ID getter in
+// preference for the async one.
void PepperMessageFilter::OnGetDeviceID(std::string* id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
id->clear();
@@ -720,17 +722,6 @@ void PepperMessageFilter::OnGetDeviceID(std::string* id) {
id->assign(id_buf, kDRMIdentifierSize);
}
-void PepperMessageFilter::OnGetDeviceIDAsync(int32_t routing_id,
- PP_Resource resource) {
- std::string result;
- OnGetDeviceID(&result);
- Send(new PpapiMsg_PPBFlashDeviceID_GetReply(ppapi::API_ID_PPB_FLASH_DEVICE_ID,
- routing_id, resource,
- result.empty() ? PP_ERROR_FAILED
- : PP_OK,
- result));
-}
-
void PepperMessageFilter::OnGetLocalDataRestrictions(
const GURL& document_url,
const GURL& plugin_url,

Powered by Google App Engine
This is Rietveld 408576698