Move PrefRegistrySimple to use unique_ptr<Value>

https://codereview.chromium.org/2784513002
This commit is contained in:
Aleksei Kuzmin 2017-06-17 01:12:22 +03:00
parent 99e57f9072
commit adddff3ee2

View file

@ -3,6 +3,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include <utility>
#include "brightray/browser/inspectable_web_contents_impl.h"
#include "base/json/json_reader.h"
@ -192,7 +194,7 @@ InspectableWebContentsView* CreateInspectableContentsView(
void InspectableWebContentsImpl::RegisterPrefs(PrefRegistrySimple* registry) {
std::unique_ptr<base::DictionaryValue> bounds_dict(new base::DictionaryValue);
RectToDictionary(gfx::Rect(0, 0, 800, 600), bounds_dict.get());
registry->RegisterDictionaryPref(kDevToolsBoundsPref, bounds_dict.release());
registry->RegisterDictionaryPref(kDevToolsBoundsPref, std::move(bounds_dict));
registry->RegisterDoublePref(kDevToolsZoomPref, 0.);
registry->RegisterDictionaryPref(kDevToolsPreferences);
}