OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.chrome.browser.download.items; |
| 6 |
| 7 import org.chromium.chrome.browser.profiles.Profile; |
| 8 import org.chromium.components.offline_items_collection.OfflineContentProvider; |
| 9 |
| 10 /** |
| 11 * Basic factory that creates and returns an {@link OfflineContentProvider} that
is attached |
| 12 * natively to {@link Profile}. |
| 13 */ |
| 14 class OfflineContentAggregatorFactory { |
| 15 private OfflineContentAggregatorFactory() {} |
| 16 |
| 17 /** |
| 18 * Used to get access to the {@link OfflineContentProvider} associated with
{@code profile}. |
| 19 * The same {@link OfflineContentProvider} will be returned for the same {@l
ink Profile}. |
| 20 * @param profile The {@link Profile} that owns the {@link OfflineContentPro
vider}. |
| 21 * @return An {@link OfflineContentProvider} instance. |
| 22 */ |
| 23 public static OfflineContentProvider forProfile(Profile profile) { |
| 24 return nativeGetOfflineContentAggregatorForProfile(profile); |
| 25 } |
| 26 |
| 27 private static native OfflineContentProvider nativeGetOfflineContentAggregat
orForProfile( |
| 28 Profile profile); |
| 29 } |
OLD | NEW |