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

Side by Side Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/display/display_preferences.h" 5 #include "chrome/browser/chromeos/display/display_preferences.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 std::unique_ptr<base::DictionaryValue> layout_value( 149 std::unique_ptr<base::DictionaryValue> layout_value(
150 new base::DictionaryValue()); 150 new base::DictionaryValue());
151 layout_value->SetBoolean(key, value != nullptr); 151 layout_value->SetBoolean(key, value != nullptr);
152 pref_data->Set(name, layout_value.release()); 152 pref_data->Set(name, layout_value.release());
153 } 153 }
154 } 154 }
155 155
156 void StoreDisplayBoolPropertyForList(const display::DisplayIdList& list, 156 void StoreDisplayBoolPropertyForList(const display::DisplayIdList& list,
157 const std::string& key, 157 const std::string& key,
158 bool value) { 158 bool value) {
159 StoreDisplayPropertyForList( 159 StoreDisplayPropertyForList(list, key,
160 list, key, base::MakeUnique<base::FundamentalValue>(value)); 160 base::MakeUnique<base::Value>(value));
161 } 161 }
162 162
163 void StoreDisplayLayoutPrefForList(const display::DisplayIdList& list, 163 void StoreDisplayLayoutPrefForList(const display::DisplayIdList& list,
164 display::DisplayPlacement::Position layout, 164 display::DisplayPlacement::Position layout,
165 int offset) { 165 int offset) {
166 StoreDisplayLayoutPrefForList(list, layout, offset, list[0]); 166 StoreDisplayLayoutPrefForList(list, layout, offset, list[0]);
167 } 167 }
168 168
169 void StoreDisplayOverscan(int64_t id, const gfx::Insets& insets) { 169 void StoreDisplayOverscan(int64_t id, const gfx::Insets& insets) {
170 DictionaryPrefUpdate update(&local_state_, prefs::kDisplayProperties); 170 DictionaryPrefUpdate update(&local_state_, prefs::kDisplayProperties);
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 1156
1157 EXPECT_EQ(gfx::Rect(0, 0, 200, 200), 1157 EXPECT_EQ(gfx::Rect(0, 0, 200, 200),
1158 display_manager()->GetDisplayForId(list[0]).bounds()); 1158 display_manager()->GetDisplayForId(list[0]).bounds());
1159 EXPECT_EQ(gfx::Rect(-200, 0, 200, 200), 1159 EXPECT_EQ(gfx::Rect(-200, 0, 200, 200),
1160 display_manager()->GetDisplayForId(list[1]).bounds()); 1160 display_manager()->GetDisplayForId(list[1]).bounds());
1161 EXPECT_EQ(gfx::Rect(-100, 200, 300, 300), 1161 EXPECT_EQ(gfx::Rect(-100, 200, 300, 300),
1162 display_manager()->GetDisplayForId(list[2]).bounds()); 1162 display_manager()->GetDisplayForId(list[2]).bounds());
1163 } 1163 }
1164 1164
1165 } // namespace chromeos 1165 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698