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

Unified Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc

Issue 2799093006: Remove base::BinaryValue (Closed)
Patch Set: Rebase 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/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
index 6d0d2f32a628bd512571832d8981b85b5ebfa44c..232618e0e9286e877c19a036b43699c9cef0a3b3 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
@@ -98,12 +98,10 @@ class TestableGetPermitAccessFunction
DISALLOW_COPY_AND_ASSIGN(TestableGetPermitAccessFunction);
};
-// Converts a string to a base::BinaryValue value whose buffer contains the
+// Converts a string to a base::Value value whose buffer contains the
// string data without the trailing '\0'.
-std::unique_ptr<base::BinaryValue> StringToBinaryValue(
- const std::string& value) {
- return base::BinaryValue::CreateWithCopiedBuffer(value.data(),
- value.length());
+std::unique_ptr<base::Value> StringToBinaryValue(const std::string& value) {
+ return base::Value::CreateWithCopiedBuffer(value.data(), value.length());
}
// Copies |private_key_source| and |public_key_source| to |private_key_target|
@@ -164,7 +162,7 @@ class EasyUnlockPrivateApiTest : public extensions::ExtensionApiUnittest {
return "";
}
- const base::BinaryValue* result_binary_value;
+ const base::Value* result_binary_value;
if (!result_list->GetBinary(0, &result_binary_value) ||
!result_binary_value) {
LOG(ERROR) << "Result not a binary value.";
@@ -193,11 +191,11 @@ TEST_F(EasyUnlockPrivateApiTest, GenerateEcP256KeyPair) {
ASSERT_TRUE(result_list);
ASSERT_EQ(2u, result_list->GetSize());
- const base::BinaryValue* public_key;
+ const base::Value* public_key;
ASSERT_TRUE(result_list->GetBinary(0, &public_key));
ASSERT_TRUE(public_key);
- const base::BinaryValue* private_key;
+ const base::Value* private_key;
ASSERT_TRUE(result_list->GetBinary(1, &private_key));
ASSERT_TRUE(private_key);

Powered by Google App Engine
This is Rietveld 408576698