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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java

Issue 2392763002: Sanitize unparcable intents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix lint and findbugs Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
index bdd6ff1138b531ebbfcb6feeb2d531dc4a4ea0ac..5adc3d238d965c59ccbc8eeb1fa07bbfc75eb9a6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java
@@ -112,13 +112,13 @@ public class ChromeLauncherActivity extends Activity
* you add _absolutely has_ to be here.
*/
@Override
- @SuppressLint("MissingSuperCall") // Called in doOnCreate.
public void onCreate(Bundle savedInstanceState) {
// Third-party code adds disk access to Activity.onCreate. http://crbug.com/619824
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
TraceEvent.begin("ChromeLauncherActivity");
TraceEvent.begin("ChromeLauncherActivity.onCreate");
try {
+ super.onCreate(savedInstanceState);
doOnCreate(savedInstanceState);
} finally {
StrictMode.setThreadPolicy(oldPolicy);
@@ -127,13 +127,13 @@ public class ChromeLauncherActivity extends Activity
}
private final void doOnCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
// This Activity is only transient. It launches another activity and
// terminates itself. However, some of the work is performed outside of
// {@link Activity#onCreate()}. To capture this, the TraceEvent starts
// in onCreate(), and ends in onPause().
// Needs to be called as early as possible, to accurately capture the
// time at which the intent was received.
+ setIntent(IntentUtils.sanitizeIntent(getIntent()));
IntentHandler.addTimestampToIntent(getIntent());
// Initialize the command line in case we've disabled document mode from there.
CommandLineInitUtil.initCommandLine(this, ChromeApplication.COMMAND_LINE_FILE);
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698