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

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

Issue 11516020: Refactor PPB_Flash GetLocalTimeZoneOffset to the new PPAPI resource model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 3383bba6086d0cfd7d13a09b7cc3f2bec66dab1a..c9bda2d89e933f850245a1e3d79cef37f3ed43f6 100644
--- a/content/browser/renderer_host/pepper/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_message_filter.cc
@@ -138,8 +138,6 @@ bool PepperMessageFilter::OnMessageReceived(const IPC::Message& msg,
bool* message_was_ok) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(PepperMessageFilter, msg, *message_was_ok)
- IPC_MESSAGE_HANDLER(PepperMsg_GetLocalTimeZoneOffset,
- OnGetLocalTimeZoneOffset)
IPC_MESSAGE_HANDLER_DELAY_REPLY(PpapiHostMsg_PPBInstance_GetFontFamilies,
OnGetFontFamilies)
// TCP messages.
@@ -245,28 +243,6 @@ PepperMessageFilter::~PepperMessageFilter() {
net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
}
-void PepperMessageFilter::OnGetLocalTimeZoneOffset(base::Time t,
- double* result) {
- // Explode it to local time and then unexplode it as if it were UTC. Also
- // explode it to UTC and unexplode it (this avoids mismatching rounding or
- // lack thereof). The time zone offset is their difference.
- //
- // The reason for this processing being in the browser process is that on
- // Linux, the localtime calls require filesystem access prohibited by the
- // sandbox.
- base::Time::Exploded exploded = { 0 };
- base::Time::Exploded utc_exploded = { 0 };
- t.LocalExplode(&exploded);
- t.UTCExplode(&utc_exploded);
- if (exploded.HasValidValues() && utc_exploded.HasValidValues()) {
- base::Time adj_time = base::Time::FromUTCExploded(exploded);
- base::Time cur = base::Time::FromUTCExploded(utc_exploded);
- *result = (adj_time - cur).InSecondsF();
- } else {
- *result = 0.0;
- }
-}
-
void PepperMessageFilter::OnGetFontFamilies(IPC::Message* reply_msg) {
GetFontListAsync(
base::Bind(&PepperMessageFilter::GetFontFamiliesComplete,
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_message_filter.h ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698