| 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.resource_provider; | 5 package org.chromium.resource_provider; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 | 8 |
| 9 import org.chromium.base.ContextUtils; | |
| 10 import org.chromium.base.PathUtils; | 9 import org.chromium.base.PathUtils; |
| 11 import org.chromium.base.annotations.CalledByNative; | 10 import org.chromium.base.annotations.CalledByNative; |
| 12 import org.chromium.base.annotations.JNINamespace; | 11 import org.chromium.base.annotations.JNINamespace; |
| 13 | 12 |
| 14 /** | 13 /** |
| 15 * This class does setup for resource_provider. | 14 * This class does setup for resource_provider. |
| 16 */ | 15 */ |
| 17 @JNINamespace("resource_provider") | 16 @JNINamespace("resource_provider") |
| 18 public final class Main { | 17 public final class Main { |
| 19 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "resource_provid
er"; | 18 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "resource_provid
er"; |
| 20 | 19 |
| 21 private Main() {} | 20 private Main() {} |
| 22 | 21 |
| 23 @SuppressWarnings("unused") | 22 @SuppressWarnings("unused") |
| 24 @CalledByNative | 23 @CalledByNative |
| 25 private static void init(Context context) { | 24 private static void init(Context context) { |
| 26 ContextUtils.initApplicationContext(context.getApplicationContext()); | |
| 27 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c
ontext); | 25 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c
ontext); |
| 28 } | 26 } |
| 29 } | 27 } |
| OLD | NEW |