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" |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 420 | 420 |
| 421 blink::WebColor color; | 421 blink::WebColor color; |
| 422 if (!blink::WebCSSParser::parseColor(&color, theme_color.string())) { | 422 if (!blink::WebCSSParser::parseColor(&color, theme_color.string())) { |
| 423 errors_.push_back(GetErrorPrefix() + | 423 errors_.push_back(GetErrorPrefix() + |
| 424 "property 'theme_color' ignored, '" + | 424 "property 'theme_color' ignored, '" + |
| 425 base::UTF16ToUTF8(theme_color.string()) + | 425 base::UTF16ToUTF8(theme_color.string()) + |
| 426 "' is not a valid color."); | 426 "' is not a valid color."); |
| 427 return Manifest::kInvalidOrMissingThemeColor; | 427 return Manifest::kInvalidOrMissingThemeColor; |
| 428 } | 428 } |
| 429 | 429 |
| 430 return static_cast<int64_t>(color); | 430 int32_t signedColor = reinterpret_cast<int32_t&>(color); |
|
Bernhard Bauer
2015/07/31 09:58:56
Local variables are unix_hacker_style. Also, can y
Lalit Maganti
2015/07/31 10:04:37
Done.
| |
| 431 return static_cast<int64_t>(signedColor); | |
| 431 } | 432 } |
| 432 | 433 |
| 433 base::NullableString16 ManifestParser::ParseGCMSenderID( | 434 base::NullableString16 ManifestParser::ParseGCMSenderID( |
| 434 const base::DictionaryValue& dictionary) { | 435 const base::DictionaryValue& dictionary) { |
| 435 return ParseString(dictionary, "gcm_sender_id", Trim); | 436 return ParseString(dictionary, "gcm_sender_id", Trim); |
| 436 } | 437 } |
| 437 | 438 |
| 438 } // namespace content | 439 } // namespace content |
| OLD | NEW |