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

Side by Side Diff: components/resource_provider/android/java/org/chromium/resource_provider/Main.java

Issue 1936093002: Reland 2 of Unify application context usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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.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;
9 import org.chromium.base.PathUtils; 10 import org.chromium.base.PathUtils;
10 import org.chromium.base.annotations.CalledByNative; 11 import org.chromium.base.annotations.CalledByNative;
11 import org.chromium.base.annotations.JNINamespace; 12 import org.chromium.base.annotations.JNINamespace;
12 13
13 /** 14 /**
14 * This class does setup for resource_provider. 15 * This class does setup for resource_provider.
15 */ 16 */
16 @JNINamespace("resource_provider") 17 @JNINamespace("resource_provider")
17 public final class Main { 18 public final class Main {
18 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "resource_provid er"; 19 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "resource_provid er";
19 20
20 private Main() {} 21 private Main() {}
21 22
22 @SuppressWarnings("unused") 23 @SuppressWarnings("unused")
23 @CalledByNative 24 @CalledByNative
24 private static void init(Context context) { 25 private static void init(Context context) {
26 ContextUtils.initApplicationContext(context.getApplicationContext());
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