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

Side by Side Diff: content/renderer/manifest/manifest_parser.h

Issue 803063003: Fix crash when passing temporary variable as document/manifest URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | content/renderer/manifest/manifest_parser_unittest.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 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 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ 5 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ 6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
7 7
8 #include "base/strings/nullable_string16.h" 8 #include "base/strings/nullable_string16.h"
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Returns the parsed string if any, a null string if the parsing failed. 129 // Returns the parsed string if any, a null string if the parsing failed.
130 base::NullableString16 ParseGCMSenderID( 130 base::NullableString16 ParseGCMSenderID(
131 const base::DictionaryValue& dictionary); 131 const base::DictionaryValue& dictionary);
132 132
133 // Parses the 'gcm_user_visible_only' field of the manifest. 133 // Parses the 'gcm_user_visible_only' field of the manifest.
134 // This is a proprietary extension of the Web Manifest specification. 134 // This is a proprietary extension of the Web Manifest specification.
135 // Returns true iff the string could be parsed as the boolean true. 135 // Returns true iff the string could be parsed as the boolean true.
136 bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary); 136 bool ParseGCMUserVisibleOnly(const base::DictionaryValue& dictionary);
137 137
138 const base::StringPiece& data_; 138 const base::StringPiece& data_;
139 const GURL& manifest_url_; 139 GURL manifest_url_;
140 const GURL& document_url_; 140 GURL document_url_;
141 141
142 bool failed_; 142 bool failed_;
143 Manifest manifest_; 143 Manifest manifest_;
144 std::vector<std::string> errors_; 144 std::vector<std::string> errors_;
145 145
146 DISALLOW_COPY_AND_ASSIGN(ManifestParser); 146 DISALLOW_COPY_AND_ASSIGN(ManifestParser);
147 }; 147 };
148 148
149 } // namespace content 149 } // namespace content
150 150
151 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ 151 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/manifest/manifest_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698