| 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 25 matching lines...) Expand all Loading... |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 std::unique_ptr<ShortcutInfo> CreateShortcutInfo( | 38 std::unique_ptr<ShortcutInfo> CreateShortcutInfo( |
| 39 const GURL& manifest_url, | 39 const GURL& manifest_url, |
| 40 const content::Manifest& manifest, | 40 const content::Manifest& manifest, |
| 41 const GURL& icon_url) { | 41 const GURL& icon_url) { |
| 42 auto shortcut_info = base::MakeUnique<ShortcutInfo>(GURL()); | 42 auto shortcut_info = base::MakeUnique<ShortcutInfo>(GURL()); |
| 43 if (!manifest.IsEmpty()) { | 43 if (!manifest.IsEmpty()) { |
| 44 shortcut_info->UpdateFromManifest(manifest); | 44 shortcut_info->UpdateFromManifest(manifest); |
| 45 shortcut_info->manifest_url = manifest_url; | 45 shortcut_info->manifest_url = manifest_url; |
| 46 shortcut_info->icon_url = icon_url; | 46 shortcut_info->best_icon_url = icon_url; |
| 47 shortcut_info->UpdateSource(ShortcutInfo::SOURCE_APP_BANNER); | 47 shortcut_info->UpdateSource(ShortcutInfo::SOURCE_APP_BANNER); |
| 48 } | 48 } |
| 49 return shortcut_info; | 49 return shortcut_info; |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // anonymous namespace | 52 } // anonymous namespace |
| 53 | 53 |
| 54 namespace banners { | 54 namespace banners { |
| 55 | 55 |
| 56 AppBannerManagerAndroid::AppBannerManagerAndroid( | 56 AppBannerManagerAndroid::AppBannerManagerAndroid( |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 } | 308 } |
| 309 | 309 |
| 310 // static | 310 // static |
| 311 void SetTimeDeltaForTesting(JNIEnv* env, | 311 void SetTimeDeltaForTesting(JNIEnv* env, |
| 312 const JavaParamRef<jclass>& clazz, | 312 const JavaParamRef<jclass>& clazz, |
| 313 jint days) { | 313 jint days) { |
| 314 AppBannerManager::SetTimeDeltaForTesting(days); | 314 AppBannerManager::SetTimeDeltaForTesting(days); |
| 315 } | 315 } |
| 316 | 316 |
| 317 } // namespace banners | 317 } // namespace banners |
| OLD | NEW |