diff options
author | dcheng <dcheng@chromium.org> | 2015-12-18 09:48:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-18 17:48:52 +0000 |
commit | e59eca16010c109a5e3e4922189c8b264d34caa9 (patch) | |
tree | 838815399c6364a99a465938df9978aeaf75c766 /extensions/browser/app_window | |
parent | 5100baf1eac806abbdaaf8002887aacf652f34e5 (diff) | |
download | chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.zip chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.gz chromium_src-e59eca16010c109a5e3e4922189c8b264d34caa9.tar.bz2 |
Convert Pass()→std::move() in //extensions
BUG=557422
Review URL: https://codereview.chromium.org/1537893002
Cr-Commit-Position: refs/heads/master@{#366120}
Diffstat (limited to 'extensions/browser/app_window')
4 files changed, 11 insertions, 5 deletions
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc index 4a508fc..98c21f3 100644 --- a/extensions/browser/app_window/app_window.cc +++ b/extensions/browser/app_window/app_window.cc @@ -6,6 +6,7 @@ #include <algorithm> #include <string> +#include <utility> #include <vector> #include "base/callback_helpers.h" @@ -574,7 +575,7 @@ void AppWindow::SetAppIconUrl(const GURL& url) { } void AppWindow::UpdateShape(scoped_ptr<SkRegion> region) { - native_app_window_->UpdateShape(region.Pass()); + native_app_window_->UpdateShape(std::move(region)); } void AppWindow::UpdateDraggableRegions( diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h index b0a0c8e..0654073 100644 --- a/extensions/browser/app_window/app_window.h +++ b/extensions/browser/app_window/app_window.h @@ -6,6 +6,7 @@ #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ #include <string> +#include <utility> #include <vector> #include "base/memory/scoped_ptr.h" @@ -361,7 +362,7 @@ class AppWindow : public content::WebContentsDelegate, bool is_ime_window() const { return is_ime_window_; } void SetAppWindowContentsForTesting(scoped_ptr<AppWindowContents> contents) { - app_window_contents_ = contents.Pass(); + app_window_contents_ = std::move(contents); } protected: diff --git a/extensions/browser/app_window/app_window_geometry_cache.cc b/extensions/browser/app_window/app_window_geometry_cache.cc index 4b3bb48..1413ce7 100644 --- a/extensions/browser/app_window/app_window_geometry_cache.cc +++ b/extensions/browser/app_window/app_window_geometry_cache.cc @@ -4,6 +4,8 @@ #include "extensions/browser/app_window/app_window_geometry_cache.h" +#include <utility> + #include "base/bind.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" @@ -132,7 +134,7 @@ void AppWindowGeometryCache::SyncToStorage() { OnGeometryCacheChanged(extension_id, it->first, bounds)); } - prefs_->SetGeometryCache(extension_id, dict.Pass()); + prefs_->SetGeometryCache(extension_id, std::move(dict)); } } 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 1b42ec1..426d4af 100644 --- a/extensions/browser/app_window/app_window_geometry_cache_unittest.cc +++ b/extensions/browser/app_window/app_window_geometry_cache_unittest.cc @@ -4,6 +4,8 @@ #include "extensions/browser/app_window/app_window_geometry_cache.h" +#include <utility> + #include "base/files/file_path.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/mock_pref_change_callback.h" @@ -88,7 +90,7 @@ void AppWindowGeometryCacheTest::SetUp() { new user_prefs::PrefRegistrySyncable; // Prefs should be registered before the PrefService is created. ExtensionPrefs::RegisterProfilePrefs(pref_registry); - pref_service_ = factory.Create(pref_registry).Pass(); + pref_service_ = factory.Create(pref_registry); extension_prefs_.reset(ExtensionPrefs::Create( browser_context(), pref_service_.get(), @@ -128,7 +130,7 @@ void AppWindowGeometryCacheTest::AddGeometryAndLoadExtension( value->SetInteger("screen_bounds_h", screen_bounds.height()); value->SetInteger("state", state); dict->SetWithoutPathExpansion(window_id, value); - extension_prefs_->SetGeometryCache(extension_id, dict.Pass()); + extension_prefs_->SetGeometryCache(extension_id, std::move(dict)); LoadExtension(extension_id); } |