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

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

Issue 1935433002: Revert of Unify application context usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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;
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698