summaryrefslogtreecommitdiffstats
path: root/chromecast/renderer
diff options
context:
space:
mode:
authorkjoswiak <kjoswiak@chromium.org>2015-02-24 12:28:57 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-24 20:29:22 +0000
commitef0c608055067fb0cfceb90d4693479878307914 (patch)
treec7f73c9e03c19e0434051a8cb53b393b187ee1f8 /chromecast/renderer
parent011cfd79b1d8d18f88b3c273a9ecd5cc65887d6a (diff)
downloadchromium_src-ef0c608055067fb0cfceb90d4693479878307914.zip
chromium_src-ef0c608055067fb0cfceb90d4693479878307914.tar.gz
chromium_src-ef0c608055067fb0cfceb90d4693479878307914.tar.bz2
Add flag to communicate last casted app to renderer process
Add last launched app flag, and read flag value into crash key on renderer start BUG=internal b/18763538 Review URL: https://codereview.chromium.org/944733003 Cr-Commit-Position: refs/heads/master@{#317874}
Diffstat (limited to 'chromecast/renderer')
-rw-r--r--chromecast/renderer/DEPS1
-rw-r--r--chromecast/renderer/cast_content_renderer_client.cc13
2 files changed, 13 insertions, 1 deletions
diff --git a/chromecast/renderer/DEPS b/chromecast/renderer/DEPS
index a15941d..22bc1dd 100644
--- a/chromecast/renderer/DEPS
+++ b/chromecast/renderer/DEPS
@@ -1,5 +1,6 @@
include_rules = [
"+chromecast/common",
+ "+chromecast/crash",
"+chromecast/media",
"+components/cdm/renderer",
"+components/network_hints/renderer",
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc
index 188e21e..1bb0930 100644
--- a/chromecast/renderer/cast_content_renderer_client.cc
+++ b/chromecast/renderer/cast_content_renderer_client.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/memory/memory_pressure_listener.h"
#include "chromecast/common/chromecast_switches.h"
+#include "chromecast/crash/cast_crash_keys.h"
#include "chromecast/renderer/cast_media_load_deferrer.h"
#include "chromecast/renderer/cast_render_process_observer.h"
#include "chromecast/renderer/key_systems_cast.h"
@@ -91,13 +92,13 @@ CastContentRendererClient::~CastContentRendererClient() {
}
void CastContentRendererClient::RenderThreadStarted() {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
#if defined(USE_NSS)
// Note: Copied from chrome_render_process_observer.cc to fix b/8676652.
//
// On platforms where the system NSS shared libraries are used,
// initialize NSS now because it won't be able to load the .so's
// after entering the sandbox.
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kSingleProcess))
crypto::InitNSSSafely();
#endif
@@ -111,6 +112,16 @@ void CastContentRendererClient::RenderThreadStarted() {
prescient_networking_dispatcher_.reset(
new network_hints::PrescientNetworkingDispatcher());
+
+ std::string last_launched_app =
+ command_line->GetSwitchValueNative(switches::kLastLaunchedApp);
+ if (!last_launched_app.empty())
+ base::debug::SetCrashKeyValue(crash_keys::kLastApp, last_launched_app);
+
+ std::string previous_app =
+ command_line->GetSwitchValueNative(switches::kPreviousApp);
+ if (!previous_app.empty())
+ base::debug::SetCrashKeyValue(crash_keys::kPreviousApp, previous_app);
}
void CastContentRendererClient::RenderViewCreated(