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

Unified Diff: chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 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
Index: chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
diff --git a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
index a249299a36d1757967f5e55024ab0d4267c657ab..20013f9ef37f015fb3eea040f98b56f9baefca09 100644
--- a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
+++ b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api_unittest.cc
@@ -114,9 +114,10 @@
base::ListValue* list = nullptr;
EXPECT_TRUE(result->GetAsList(&list));
- for (const base::Value& value : *list) {
+ // Consume the unique_ptr by reference so we don't take ownership.
+ for (const std::unique_ptr<base::Value>& value : (*list)) {
std::string mode;
- EXPECT_TRUE(value.GetAsString(&mode));
+ EXPECT_TRUE(value->GetAsString(&mode));
modes.push_back(quick_unlock_private::ParseQuickUnlockMode(mode));
}
@@ -133,9 +134,9 @@
base::ListValue* list = nullptr;
EXPECT_TRUE(result->GetAsList(&list));
- for (const base::Value& value : *list) {
+ for (const std::unique_ptr<base::Value>& value : *list) {
std::string mode;
- EXPECT_TRUE(value.GetAsString(&mode));
+ EXPECT_TRUE(value->GetAsString(&mode));
modes.push_back(quick_unlock_private::ParseQuickUnlockMode(mode));
}

Powered by Google App Engine
This is Rietveld 408576698