| 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 #include "chrome/browser/android/banners/app_banner_manager_android.h" | 5 #include "chrome/browser/android/banners/app_banner_manager_android.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 std::unique_ptr<ShortcutInfo> CreateShortcutInfo( | 39 std::unique_ptr<ShortcutInfo> CreateShortcutInfo( |
| 40 const GURL& manifest_url, | 40 const GURL& manifest_url, |
| 41 const content::Manifest& manifest, | 41 const content::Manifest& manifest, |
| 42 const GURL& icon_url) { | 42 const GURL& icon_url) { |
| 43 auto shortcut_info = base::MakeUnique<ShortcutInfo>(GURL()); | 43 auto shortcut_info = base::MakeUnique<ShortcutInfo>(GURL()); |
| 44 if (!manifest.IsEmpty()) { | 44 if (!manifest.IsEmpty()) { |
| 45 shortcut_info->UpdateFromManifest(manifest); | 45 shortcut_info->UpdateFromManifest(manifest); |
| 46 shortcut_info->manifest_url = manifest_url; | 46 shortcut_info->manifest_url = manifest_url; |
| 47 shortcut_info->icon_url = icon_url; | 47 shortcut_info->best_icon_url = icon_url; |
| 48 shortcut_info->UpdateSource(ShortcutInfo::SOURCE_APP_BANNER); | 48 shortcut_info->UpdateSource(ShortcutInfo::SOURCE_APP_BANNER); |
| 49 } | 49 } |
| 50 return shortcut_info; | 50 return shortcut_info; |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // anonymous namespace | 53 } // anonymous namespace |
| 54 | 54 |
| 55 namespace banners { | 55 namespace banners { |
| 56 | 56 |
| 57 AppBannerManagerAndroid::AppBannerManagerAndroid( | 57 AppBannerManagerAndroid::AppBannerManagerAndroid( |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 } | 316 } |
| 317 | 317 |
| 318 // static | 318 // static |
| 319 void SetTimeDeltaForTesting(JNIEnv* env, | 319 void SetTimeDeltaForTesting(JNIEnv* env, |
| 320 const JavaParamRef<jclass>& clazz, | 320 const JavaParamRef<jclass>& clazz, |
| 321 jint days) { | 321 jint days) { |
| 322 AppBannerManager::SetTimeDeltaForTesting(days); | 322 AppBannerManager::SetTimeDeltaForTesting(days); |
| 323 } | 323 } |
| 324 | 324 |
| 325 } // namespace banners | 325 } // namespace banners |
| OLD | NEW |