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

Side by Side Diff: chrome/browser/android/webapk/webapk_update_manager.cc

Issue 2822623002: [WebAPKs] Fix WebAPK updates when Web Manifest does not specify color (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/webapk/webapk_update_manager.h" 5 #include "chrome/browser/android/webapk/webapk_update_manager.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 GURL best_primary_icon_url( 76 GURL best_primary_icon_url(
77 ConvertJavaStringToUTF8(env, java_best_primary_icon_url)); 77 ConvertJavaStringToUTF8(env, java_best_primary_icon_url));
78 ShortcutInfo info(start_url); 78 ShortcutInfo info(start_url);
79 info.scope = scope; 79 info.scope = scope;
80 info.name = ConvertJavaStringToUTF16(env, java_name); 80 info.name = ConvertJavaStringToUTF16(env, java_name);
81 info.short_name = ConvertJavaStringToUTF16(env, java_short_name); 81 info.short_name = ConvertJavaStringToUTF16(env, java_short_name);
82 info.user_title = info.short_name; 82 info.user_title = info.short_name;
83 info.display = static_cast<blink::WebDisplayMode>(java_display_mode); 83 info.display = static_cast<blink::WebDisplayMode>(java_display_mode);
84 info.orientation = 84 info.orientation =
85 static_cast<blink::WebScreenOrientationLockType>(java_orientation); 85 static_cast<blink::WebScreenOrientationLockType>(java_orientation);
86 info.theme_color = (long)java_theme_color; 86 info.theme_color = (int64_t)java_theme_color;
87 info.background_color = (long)java_background_color; 87 info.background_color = (int64_t)java_background_color;
88 info.best_primary_icon_url = best_primary_icon_url; 88 info.best_primary_icon_url = best_primary_icon_url;
89 info.manifest_url = web_manifest_url; 89 info.manifest_url = web_manifest_url;
90 90
91 base::android::AppendJavaStringArrayToStringVector(env, java_icon_urls.obj(), 91 base::android::AppendJavaStringArrayToStringVector(env, java_icon_urls.obj(),
92 &info.icon_urls); 92 &info.icon_urls);
93 93
94 std::vector<std::string> icon_hashes; 94 std::vector<std::string> icon_hashes;
95 base::android::AppendJavaStringArrayToStringVector( 95 base::android::AppendJavaStringArrayToStringVector(
96 env, java_icon_hashes.obj(), &icon_hashes); 96 env, java_icon_hashes.obj(), &icon_hashes);
97 97
(...skipping 16 matching lines...) Expand all
114 base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id, 114 base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id,
115 WebApkInstallResult::FAILURE, false /* relax_updates */, 115 WebApkInstallResult::FAILURE, false /* relax_updates */,
116 "" /* webapk_package */)); 116 "" /* webapk_package */));
117 return; 117 return;
118 } 118 }
119 install_service->UpdateAsync( 119 install_service->UpdateAsync(
120 info, best_primary_icon_bitmap, webapk_package, java_webapk_version, 120 info, best_primary_icon_bitmap, webapk_package, java_webapk_version,
121 icon_url_to_murmur2_hash, java_is_manifest_stale, 121 icon_url_to_murmur2_hash, java_is_manifest_stale,
122 base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id)); 122 base::Bind(&WebApkUpdateManager::OnBuiltWebApk, id));
123 } 123 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698