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

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

Issue 580513002: Add support for gcm_sender_id in Manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_start_url
Patch Set: add gcm_sender_id to ipc traits Created 6 years, 3 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // coming from a known and secure source. It must be processed accordingly. 104 // coming from a known and secure source. It must be processed accordingly.
105 Manifest manifest = insecure_manifest; 105 Manifest manifest = insecure_manifest;
106 manifest.name = base::NullableString16( 106 manifest.name = base::NullableString16(
107 manifest.name.string().substr(0, Manifest::kMaxIPCStringLength), 107 manifest.name.string().substr(0, Manifest::kMaxIPCStringLength),
108 manifest.name.is_null()); 108 manifest.name.is_null());
109 manifest.short_name = base::NullableString16( 109 manifest.short_name = base::NullableString16(
110 manifest.short_name.string().substr(0, Manifest::kMaxIPCStringLength), 110 manifest.short_name.string().substr(0, Manifest::kMaxIPCStringLength),
111 manifest.short_name.is_null()); 111 manifest.short_name.is_null());
112 if (!manifest.start_url.is_empty() && !manifest.start_url.is_valid()) 112 if (!manifest.start_url.is_empty() && !manifest.start_url.is_valid())
113 manifest.start_url = GURL(); 113 manifest.start_url = GURL();
114 manifest.gcm_sender_id = base::NullableString16(
115 manifest.gcm_sender_id.string().substr(
116 0, Manifest::kMaxIPCStringLength),
117 manifest.gcm_sender_id.is_null());
114 118
115 callback->Run(manifest); 119 callback->Run(manifest);
116 callbacks->Remove(request_id); 120 callbacks->Remove(request_id);
117 if (callbacks->IsEmpty()) { 121 if (callbacks->IsEmpty()) {
118 delete callbacks; 122 delete callbacks;
119 pending_callbacks_.erase(render_frame_host); 123 pending_callbacks_.erase(render_frame_host);
120 } 124 }
121 } 125 }
122 126
123 } // namespace content 127 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/manifest_manager_messages.h » ('j') | content/renderer/manifest/manifest_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698