diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-08 19:32:47 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-08 19:32:47 +0000 |
commit | e853a93ac80b38de8ddbbbb0a51584c998c925f6 (patch) | |
tree | 95793d6855d0857305834c9c6d34aae925b523f4 /content | |
parent | a31fe0f7e41d48442ba44d2c0dd51581fcda408f (diff) | |
download | chromium_src-e853a93ac80b38de8ddbbbb0a51584c998c925f6.zip chromium_src-e853a93ac80b38de8ddbbbb0a51584c998c925f6.tar.gz chromium_src-e853a93ac80b38de8ddbbbb0a51584c998c925f6.tar.bz2 |
pepper_message_filter: GetDeviceID: enforce incognito behavior
While pepper flash is aware of the incognito context, there's no reason
to leave the decision logic to the sandboxed code. Now, the device
identifier returned should be empty.
BUG=chromium-os:30378
TEST=built with tests, grabbed libppapi_tests.so; x86-alex works with pepper test even in incognito.
(running other testsuites now)
Change-Id: I09a1fcc37f183acfa851ce3e88d27dfa968d7a8b
R=brettw@chromium.org,sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10378036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/renderer_host/pepper_message_filter.cc | 6 | ||||
-rw-r--r-- | content/browser/renderer_host/pepper_message_filter.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/content/browser/renderer_host/pepper_message_filter.cc b/content/browser/renderer_host/pepper_message_filter.cc index 8bb6a24..7c507376 100644 --- a/content/browser/renderer_host/pepper_message_filter.cc +++ b/content/browser/renderer_host/pepper_message_filter.cc @@ -79,7 +79,9 @@ PepperMessageFilter::PepperMessageFilter( next_socket_id_(1) { DCHECK(type == RENDERER); DCHECK(browser_context); + // Keep BrowserContext data in FILE-thread friendly storage. browser_path_ = browser_context->GetPath(); + incognito_ = browser_context->IsOffTheRecord(); DCHECK(resource_context_); } @@ -661,6 +663,10 @@ void PepperMessageFilter::OnGetDeviceID(std::string* id) { return; } + // Return an empty value when off the record. + if (incognito_) + return; + // TODO(wad,brettw) Add OffTheRecord() enforcement here. // Normally this is left for the plugin to do, but in the // future we should check here as an added safeguard. diff --git a/content/browser/renderer_host/pepper_message_filter.h b/content/browser/renderer_host/pepper_message_filter.h index 1ef1e50..5e10abf 100644 --- a/content/browser/renderer_host/pepper_message_filter.h +++ b/content/browser/renderer_host/pepper_message_filter.h @@ -255,6 +255,7 @@ class PepperMessageFilter NetworkMonitorIdSet network_monitor_ids_; FilePath browser_path_; + bool incognito_; DISALLOW_COPY_AND_ASSIGN(PepperMessageFilter); }; |