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

Side by Side Diff: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellApplication.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix per review. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content_shell_apk; 5 package org.chromium.content_shell_apk;
6 6
7 import org.chromium.base.CommandLine; 7 import org.chromium.base.CommandLine;
8 import org.chromium.base.ContextUtils;
8 import org.chromium.base.PathUtils; 9 import org.chromium.base.PathUtils;
9 import org.chromium.base.annotations.SuppressFBWarnings; 10 import org.chromium.base.annotations.SuppressFBWarnings;
10 import org.chromium.content.app.ContentApplication; 11 import org.chromium.content.app.ContentApplication;
11 12
12 /** 13 /**
13 * Entry point for the content shell application. Handles initialization of inf ormation that needs 14 * Entry point for the content shell application. Handles initialization of inf ormation that needs
14 * to be shared across the main activity and the child services created. 15 * to be shared across the main activity and the child services created.
15 */ 16 */
16 public class ContentShellApplication extends ContentApplication { 17 public class ContentShellApplication extends ContentApplication {
17 18
18 public static final String COMMAND_LINE_FILE = "/data/local/tmp/content-shel l-command-line"; 19 public static final String COMMAND_LINE_FILE = "/data/local/tmp/content-shel l-command-line";
19 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "content_shell"; 20 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "content_shell";
20 21
22 public ContentShellApplication() {
23 super();
24 ContextUtils.initApplicationContext(this);
25 }
26
21 @Override 27 @Override
22 public void onCreate() { 28 public void onCreate() {
23 super.onCreate(); 29 super.onCreate();
24 } 30 }
25 31
26 @Override 32 @Override
27 protected void initializeLibraryDependencies() { 33 protected void initializeLibraryDependencies() {
28 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, t his); 34 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, t his);
29 } 35 }
30 36
31 @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME") 37 @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME")
32 @Override 38 @Override
33 public void initCommandLine() { 39 public void initCommandLine() {
34 if (!CommandLine.isInitialized()) { 40 if (!CommandLine.isInitialized()) {
35 CommandLine.initFromFile(COMMAND_LINE_FILE); 41 CommandLine.initFromFile(COMMAND_LINE_FILE);
36 } 42 }
37 } 43 }
38 44
39 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698