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

Side by Side Diff: extensions/browser/app_window/app_window.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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 "extensions/browser/app_window/app_window.h" 5 #include "extensions/browser/app_window/app_window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 const int kDefaultWidth = 512; 75 const int kDefaultWidth = 512;
76 const int kDefaultHeight = 384; 76 const int kDefaultHeight = 384;
77 77
78 void SetConstraintProperty(const std::string& name, 78 void SetConstraintProperty(const std::string& name,
79 int value, 79 int value,
80 base::DictionaryValue* bounds_properties) { 80 base::DictionaryValue* bounds_properties) {
81 if (value != SizeConstraints::kUnboundedSize) 81 if (value != SizeConstraints::kUnboundedSize)
82 bounds_properties->SetInteger(name, value); 82 bounds_properties->SetInteger(name, value);
83 else 83 else
84 bounds_properties->Set(name, base::Value::CreateNullValue()); 84 bounds_properties->Set(name, base::MakeUnique<base::Value>());
85 } 85 }
86 86
87 void SetBoundsProperties(const gfx::Rect& bounds, 87 void SetBoundsProperties(const gfx::Rect& bounds,
88 const gfx::Size& min_size, 88 const gfx::Size& min_size,
89 const gfx::Size& max_size, 89 const gfx::Size& max_size,
90 const std::string& bounds_name, 90 const std::string& bounds_name,
91 base::DictionaryValue* window_properties) { 91 base::DictionaryValue* window_properties) {
92 std::unique_ptr<base::DictionaryValue> bounds_properties( 92 std::unique_ptr<base::DictionaryValue> bounds_properties(
93 new base::DictionaryValue()); 93 new base::DictionaryValue());
94 94
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 region.bounds.x(), 1113 region.bounds.x(),
1114 region.bounds.y(), 1114 region.bounds.y(),
1115 region.bounds.right(), 1115 region.bounds.right(),
1116 region.bounds.bottom(), 1116 region.bounds.bottom(),
1117 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1117 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1118 } 1118 }
1119 return sk_region; 1119 return sk_region;
1120 } 1120 }
1121 1121
1122 } // namespace extensions 1122 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/socket/socket_api.cc ('k') | extensions/common/permissions/manifest_permission_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698