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

Side by Side Diff: components/test/android/browsertests_apk/src/org/chromium/components_browsertests_apk/ComponentsBrowserTestsApplication.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.components_browsertests_apk; 5 package org.chromium.components_browsertests_apk;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.BaseChromiumApplication; 9 import org.chromium.base.BaseChromiumApplication;
10 import org.chromium.base.ContextUtils;
10 import org.chromium.base.PathUtils; 11 import org.chromium.base.PathUtils;
11 12
12 /** 13 /**
13 * A basic content browser tests {@link android.app.Application}. 14 * A basic content browser tests {@link android.app.Application}.
14 */ 15 */
15 public class ComponentsBrowserTestsApplication extends BaseChromiumApplication { 16 public class ComponentsBrowserTestsApplication extends BaseChromiumApplication {
16 static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "components_shell"; 17 static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "components_shell";
17 18
18 @Override 19 @Override
19 public void onCreate() { 20 public void onCreate() {
20 super.onCreate(); 21 super.onCreate();
22 ContextUtils.initApplicationContext(this);
21 initializeApplicationParameters(this); 23 initializeApplicationParameters(this);
22 } 24 }
23 25
24 public static void initializeApplicationParameters(Context context) { 26 public static void initializeApplicationParameters(Context context) {
25 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c ontext); 27 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c ontext);
26 } 28 }
27 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698