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

Side by Side Diff: content/browser/manifest/manifest_manager_host.cc

Issue 919293002: Add related_applications field to manifest parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do IPC stuff Created 5 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/manifest/manifest_manager_host.h" 5 #include "content/browser/manifest/manifest_manager_host.h"
6 6
7 #include "content/common/manifest_manager_messages.h" 7 #include "content/common/manifest_manager_messages.h"
8 #include "content/public/browser/render_frame_host.h" 8 #include "content/public/browser/render_frame_host.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/common/manifest.h" 10 #include "content/public/common/manifest.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 manifest.icons[i].src = GURL(); 120 manifest.icons[i].src = GURL();
121 manifest.icons[i].type = base::NullableString16( 121 manifest.icons[i].type = base::NullableString16(
122 manifest.icons[i].type.string().substr(0, 122 manifest.icons[i].type.string().substr(0,
123 Manifest::kMaxIPCStringLength), 123 Manifest::kMaxIPCStringLength),
124 manifest.icons[i].type.is_null()); 124 manifest.icons[i].type.is_null());
125 } 125 }
126 manifest.gcm_sender_id = base::NullableString16( 126 manifest.gcm_sender_id = base::NullableString16(
127 manifest.gcm_sender_id.string().substr( 127 manifest.gcm_sender_id.string().substr(
128 0, Manifest::kMaxIPCStringLength), 128 0, Manifest::kMaxIPCStringLength),
129 manifest.gcm_sender_id.is_null()); 129 manifest.gcm_sender_id.is_null());
130 for (size_t i = 0; i < manifest.chrome_related_applications.size(); ++i) {
mlamouri (slow - plz ping) 2015/02/17 12:43:20 nit: maybe that would be easier to read: for (Ch
131 manifest.chrome_related_applications[i].id= base::NullableString16(
132 manifest.chrome_related_applications[i].id.string().substr(
133 0,
134 Manifest::kMaxIPCStringLength),
135 manifest.chrome_related_applications[i].id.is_null());
136 }
130 137
131 callback->Run(manifest); 138 callback->Run(manifest);
132 callbacks->Remove(request_id); 139 callbacks->Remove(request_id);
133 if (callbacks->IsEmpty()) { 140 if (callbacks->IsEmpty()) {
134 delete callbacks; 141 delete callbacks;
135 pending_callbacks_.erase(render_frame_host); 142 pending_callbacks_.erase(render_frame_host);
136 } 143 }
137 } 144 }
138 145
139 } // namespace content 146 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/manifest_manager_messages.h » ('j') | content/common/manifest_manager_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698