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

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

Issue 550173002: Implement ManifestParser in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_fetcher
Patch Set: 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
7
8 #include <string>
9
10 #include "base/strings/nullable_string16.h"
11 #include "base/strings/string_piece.h"
12 #include "content/common/content_export.h"
13
14 namespace base {
15 class DictionaryValue;
16 }
17
18 namespace content {
19
20 struct Manifest;
21
22 // ManifestParser handles the logic of parsing the Web Manifest from a string.
23 // It does implement:
Michael van Ouwerkerk 2014/09/08 17:07:42 "It implements"
mlamouri (slow - plz ping) 2014/09/08 17:13:17 Acknowledged.
24 // http://w3c.github.io/manifest/#dfn-steps-for-processing-a-manifest
25 // Its private methods implement all the sub steps required by the manifest
26 // parsing algorithm.
27 class CONTENT_EXPORT ManifestParser {
28 public:
29 static Manifest Parse(const base::StringPiece&);
30
31 private:
32 // Parses the 'name' field of the manifest, as defined in:
33 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-name-member
34 // Returns the parsed string if any, a null string if the parsing failed.
35 static base::NullableString16 ParseName(
36 const base::DictionaryValue& dictionary);
37
38 // Parses the 'short_name' field of the manifest, as defined in:
39 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-short-name-memb er
40 // |short_name| is an out parameter that must not be null.
41 // Returns the parsed string if any, a null string if the parsing failed.
42 static base::NullableString16 ParseShortName(
43 const base::DictionaryValue& dictionary);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698