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

Side by Side Diff: chrome/browser/android/banners/app_banner_manager_android.cc

Issue 2453423002: Send all of the icon URLs listed in Web Manifest to WebAPK Server. (Closed)
Patch Set: Nits. Created 4 years, 1 month 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
« no previous file with comments | « chrome/android/webapk/shell_apk/BUILD.gn ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « chrome/android/webapk/shell_apk/BUILD.gn ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698