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

Unified Diff: components/login/screens/screen_context.cc

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/login/screens/screen_context.h ('k') | components/login/screens/screen_context_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/login/screens/screen_context.cc
diff --git a/components/login/screens/screen_context.cc b/components/login/screens/screen_context.cc
index fa253fc00e458b9ab206d5aa954ff9ee23be7735..37a307ec3b6c3c5868ddf8459991a63257cfc385 100644
--- a/components/login/screens/screen_context.cc
+++ b/components/login/screens/screen_context.cc
@@ -4,8 +4,9 @@
#include "components/login/screens/screen_context.h"
+#include <memory>
+
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
namespace login {
@@ -123,8 +124,8 @@ String16List ScreenContext::GetString16List(
}
void ScreenContext::CopyFrom(ScreenContext& context) {
- scoped_ptr<base::DictionaryValue> storage(context.storage_.DeepCopy());
- scoped_ptr<base::DictionaryValue> changes(context.changes_.DeepCopy());
+ std::unique_ptr<base::DictionaryValue> storage(context.storage_.DeepCopy());
+ std::unique_ptr<base::DictionaryValue> changes(context.changes_.DeepCopy());
storage_.Swap(storage.get());
changes_.Swap(changes.get());
}
@@ -166,7 +167,7 @@ void ScreenContext::ApplyChanges(const base::DictionaryValue& diff,
bool ScreenContext::Set(const KeyType& key, base::Value* value) {
DCHECK(CalledOnValidThread());
DCHECK(value);
- scoped_ptr<base::Value> new_value(value);
+ std::unique_ptr<base::Value> new_value(value);
base::Value* current_value;
bool in_storage = storage_.Get(key, &current_value);
« no previous file with comments | « components/login/screens/screen_context.h ('k') | components/login/screens/screen_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698