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

Unified Diff: content/renderer/manifest/manifest_manager.cc

Issue 919293002: Add related_applications field to manifest parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/manifest.cc ('k') | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/manifest/manifest_manager.cc
diff --git a/content/renderer/manifest/manifest_manager.cc b/content/renderer/manifest/manifest_manager.cc
index 9f889dfd0f7020f7831827ff9159036fe1f569b5..52667ba373b8492d7885fe8f1cfc1716ec499f81 100644
--- a/content/renderer/manifest/manifest_manager.cc
+++ b/content/renderer/manifest/manifest_manager.cc
@@ -61,16 +61,21 @@ void ManifestManager::OnRequestManifestComplete(
ipc_manifest.short_name.string().substr(0,
Manifest::kMaxIPCStringLength),
ipc_manifest.short_name.is_null());
- for (size_t i = 0; i < ipc_manifest.icons.size(); ++i) {
- ipc_manifest.icons[i].type = base::NullableString16(
- ipc_manifest.icons[i].type.string().substr(
- 0, Manifest::kMaxIPCStringLength),
- ipc_manifest.icons[i].type.is_null());
+ for (auto& icon : ipc_manifest.icons) {
+ icon.type = base::NullableString16(
+ icon.type.string().substr(0, Manifest::kMaxIPCStringLength),
+ icon.type.is_null());
}
ipc_manifest.gcm_sender_id = base::NullableString16(
ipc_manifest.gcm_sender_id.string().substr(
0, Manifest::kMaxIPCStringLength),
ipc_manifest.gcm_sender_id.is_null());
+ for (auto& related_application : ipc_manifest.related_applications) {
+ related_application.id =
+ base::NullableString16(related_application.id.string().substr(
+ 0, Manifest::kMaxIPCStringLength),
+ related_application.id.is_null());
+ }
Send(new ManifestManagerHostMsg_RequestManifestResponse(
routing_id(), request_id, ipc_manifest));
« no previous file with comments | « content/public/common/manifest.cc ('k') | content/renderer/manifest/manifest_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698