Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/renderer/manifest/manifest_parser.h" | 5 #include "content/renderer/manifest/manifest_parser.h" |
| 6 | 6 |
| 7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/strings/nullable_string16.h" | 8 #include "base/strings/nullable_string16.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "content/public/common/manifest.h" | 14 #include "content/public/common/manifest.h" |
| 15 #include "content/renderer/manifest/manifest_uma_util.h" | |
| 15 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 enum TrimType { | 22 enum TrimType { |
| 22 Trim, | 23 Trim, |
| 23 NoTrim | 24 NoTrim |
| 24 }; | 25 }; |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 Manifest manifest; | 310 Manifest manifest; |
| 310 | 311 |
| 311 manifest.name = ParseName(*dictionary); | 312 manifest.name = ParseName(*dictionary); |
| 312 manifest.short_name = ParseShortName(*dictionary); | 313 manifest.short_name = ParseShortName(*dictionary); |
| 313 manifest.start_url = ParseStartURL(*dictionary, manifest_url, document_url); | 314 manifest.start_url = ParseStartURL(*dictionary, manifest_url, document_url); |
| 314 manifest.display = ParseDisplay(*dictionary); | 315 manifest.display = ParseDisplay(*dictionary); |
| 315 manifest.orientation = ParseOrientation(*dictionary); | 316 manifest.orientation = ParseOrientation(*dictionary); |
| 316 manifest.icons = ParseIcons(*dictionary, manifest_url); | 317 manifest.icons = ParseIcons(*dictionary, manifest_url); |
| 317 manifest.gcm_sender_id = ParseGCMSenderID(*dictionary); | 318 manifest.gcm_sender_id = ParseGCMSenderID(*dictionary); |
| 318 | 319 |
| 320 ManifestUmaUtil::ParsedManifest(manifest); | |
|
Miguel Garcia
2014/10/02 14:26:46
since you only parse from one place I would do thi
mlamouri (slow - plz ping)
2014/10/02 15:35:06
Done.
| |
| 321 | |
| 319 return manifest; | 322 return manifest; |
| 320 } | 323 } |
| 321 | 324 |
| 322 } // namespace content | 325 } // namespace content |
| OLD | NEW |