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

Unified Diff: extensions/browser/user_script_loader.cc

Issue 2551723002: Replace unique_ptr.reset/release with std::move under src/extensions (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/updater/request_queue_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/user_script_loader.cc
diff --git a/extensions/browser/user_script_loader.cc b/extensions/browser/user_script_loader.cc
index 0855deb9026a4324995a4e001e977b75ca4b2bbc..6ebe496964e0d23c73c1481ea3d79ffee966d12d 100644
--- a/extensions/browser/user_script_loader.cc
+++ b/extensions/browser/user_script_loader.cc
@@ -359,7 +359,7 @@ void UserScriptLoader::SetReady(bool ready) {
void UserScriptLoader::OnScriptsLoaded(
std::unique_ptr<UserScriptList> user_scripts,
std::unique_ptr<base::SharedMemory> shared_memory) {
- user_scripts_.reset(user_scripts.release());
+ user_scripts_ = std::move(user_scripts);
if (pending_load_) {
// While we were loading, there were further changes. Don't bother
// notifying about these scripts and instead just immediately reload.
@@ -381,7 +381,7 @@ void UserScriptLoader::OnScriptsLoaded(
}
// We've got scripts ready to go.
- shared_memory_.reset(shared_memory.release());
+ shared_memory_ = std::move(shared_memory);
for (content::RenderProcessHost::iterator i(
content::RenderProcessHost::AllHostsIterator());
« no previous file with comments | « extensions/browser/updater/request_queue_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698