| OLD | NEW |
| 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.ContextUtils; |
| 11 import org.chromium.base.PathUtils; | 11 import org.chromium.base.PathUtils; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * A basic content browser tests {@link android.app.Application}. | 14 * A basic content browser tests {@link android.app.Application}. |
| 15 */ | 15 */ |
| 16 public class ComponentsBrowserTestsApplication extends BaseChromiumApplication { | 16 public class ComponentsBrowserTestsApplication extends BaseChromiumApplication { |
| 17 static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "components_shell"; | 17 static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "components_shell"; |
| 18 | 18 |
| 19 @Override | 19 @Override |
| 20 protected void attachBaseContext(Context base) { |
| 21 super.attachBaseContext(base); |
| 22 ContextUtils.initApplicationContext(this); |
| 23 } |
| 24 |
| 25 @Override |
| 20 public void onCreate() { | 26 public void onCreate() { |
| 21 super.onCreate(); | 27 super.onCreate(); |
| 22 ContextUtils.initApplicationContext(this); | 28 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
| 23 initializeApplicationParameters(this); | |
| 24 } | |
| 25 | |
| 26 public static void initializeApplicationParameters(Context context) { | |
| 27 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c
ontext); | |
| 28 } | 29 } |
| 29 } | 30 } |
| OLD | NEW |