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

Unified Diff: chromecast/renderer/cast_content_renderer_client.cc

Issue 944733003: Add flag to communicate last casted app to renderer process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment + rebase Created 5 years, 10 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
« chromecast/common/chromecast_switches.cc ('K') | « chromecast/renderer/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/renderer/cast_content_renderer_client.cc
diff --git a/chromecast/renderer/cast_content_renderer_client.cc b/chromecast/renderer/cast_content_renderer_client.cc
index 188e21e52c1d075f37f9968930fc016dff5d1c26..1bb093027a5d985a3bdd9dd4f173cff722f528a6 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(
« chromecast/common/chromecast_switches.cc ('K') | « chromecast/renderer/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698