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

Side by Side Diff: content/public/common/manifest.cc

Issue 1246953002: content: make theme_color more resilient to casting issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 5 years, 4 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/public/common/manifest.h" 5 #include "content/public/common/manifest.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 const double Manifest::Icon::kDefaultDensity = 1; 9 const double Manifest::Icon::kDefaultDensity = 1;
10 const int64_t Manifest::kInvalidOrMissingThemeColor = -1; 10 const int64_t Manifest::kInvalidOrMissingThemeColor =
11 static_cast<int64_t>(std::numeric_limits<int32_t>::max()) + 1;
11 const size_t Manifest::kMaxIPCStringLength = 4 * 1024; 12 const size_t Manifest::kMaxIPCStringLength = 4 * 1024;
12 13
13 Manifest::Icon::Icon() 14 Manifest::Icon::Icon()
14 : density(kDefaultDensity) { 15 : density(kDefaultDensity) {
15 } 16 }
16 17
17 Manifest::Icon::~Icon() { 18 Manifest::Icon::~Icon() {
18 } 19 }
19 20
20 Manifest::RelatedApplication::RelatedApplication() { 21 Manifest::RelatedApplication::RelatedApplication() {
(...skipping 19 matching lines...) Expand all
40 display == DISPLAY_MODE_UNSPECIFIED && 41 display == DISPLAY_MODE_UNSPECIFIED &&
41 orientation == blink::WebScreenOrientationLockDefault && 42 orientation == blink::WebScreenOrientationLockDefault &&
42 icons.empty() && 43 icons.empty() &&
43 related_applications.empty() && 44 related_applications.empty() &&
44 !prefer_related_applications && 45 !prefer_related_applications &&
45 theme_color == Manifest::kInvalidOrMissingThemeColor && 46 theme_color == Manifest::kInvalidOrMissingThemeColor &&
46 gcm_sender_id.is_null(); 47 gcm_sender_id.is_null();
47 } 48 }
48 49
49 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/manifest/manifest_parser.cc » ('j') | content/renderer/manifest/manifest_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698