Chromium Code Reviews| Index: extensions/browser/app_window/app_window_geometry_cache_unittest.cc |
| diff --git a/extensions/browser/app_window/app_window_geometry_cache_unittest.cc b/extensions/browser/app_window/app_window_geometry_cache_unittest.cc |
| index 30f428dd08813d016e4699bb0b8c35e78cdb2ab7..e10062e959cd00dde1edda433f2c5f9b62b60e9a 100644 |
| --- a/extensions/browser/app_window/app_window_geometry_cache_unittest.cc |
| +++ b/extensions/browser/app_window/app_window_geometry_cache_unittest.cc |
| @@ -10,6 +10,7 @@ |
| #include <utility> |
| #include "base/files/file_path.h" |
| +#include "base/memory/ptr_util.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "components/pref_registry/pref_registry_syncable.h" |
| #include "components/prefs/mock_pref_change_callback.h" |
| @@ -121,7 +122,8 @@ void AppWindowGeometryCacheTest::AddGeometryAndLoadExtension( |
| const gfx::Rect& screen_bounds, |
| ui::WindowShowState state) { |
| std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue); |
|
asargent_no_longer_on_chrome
2016/09/29 16:58:25
Please use MakeUnique on this line as well
|
| - base::DictionaryValue* value = new base::DictionaryValue; |
| + std::unique_ptr<base::DictionaryValue> value; |
| + value = base::MakeUnique<base::DictionaryValue>(); |
|
asargent_no_longer_on_chrome
2016/09/29 16:58:25
No need to use two separate statements, you should
|
| value->SetInteger("x", bounds.x()); |
| value->SetInteger("y", bounds.y()); |
| value->SetInteger("w", bounds.width()); |
| @@ -131,7 +133,7 @@ void AppWindowGeometryCacheTest::AddGeometryAndLoadExtension( |
| value->SetInteger("screen_bounds_w", screen_bounds.width()); |
| value->SetInteger("screen_bounds_h", screen_bounds.height()); |
| value->SetInteger("state", state); |
| - dict->SetWithoutPathExpansion(window_id, value); |
| + dict->SetWithoutPathExpansion(window_id, std::move(value)); |
| extension_prefs_->SetGeometryCache(extension_id, std::move(dict)); |
| LoadExtension(extension_id); |
| } |