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

Unified Diff: components/policy/core/common/policy_loader_win_unittest.cc

Issue 1441543002: Make vector_as_array use std::vector::data and switch a few directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark comment Created 5 years, 1 month 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: components/policy/core/common/policy_loader_win_unittest.cc
diff --git a/components/policy/core/common/policy_loader_win_unittest.cc b/components/policy/core/common/policy_loader_win_unittest.cc
index 52bd22410862d96b226919446c3d273261734929..a932199aa0ef0f4a6c305874ff45537a5e335da3 100644
--- a/components/policy/core/common/policy_loader_win_unittest.cc
+++ b/components/policy/core/common/policy_loader_win_unittest.cc
@@ -589,10 +589,9 @@ void PRegTestHarness::AppendRecordToPRegFile(const base::string16& path,
buffer.insert(buffer.end(), data, data + size);
AppendChars(&buffer, L"]");
- ASSERT_TRUE(base::AppendToFile(
- preg_file_path_,
- reinterpret_cast<const char*>(vector_as_array(&buffer)),
- buffer.size()));
+ ASSERT_TRUE(base::AppendToFile(preg_file_path_,
+ reinterpret_cast<const char*>(buffer.data()),
+ buffer.size()));
}
void PRegTestHarness::AppendDWORDToPRegFile(const base::string16& path,
@@ -613,7 +612,7 @@ void PRegTestHarness::AppendStringToPRegFile(const base::string16& path,
data.push_back(base::ByteSwapToLE16(L'\0'));
AppendRecordToPRegFile(path, key, REG_SZ, data.size() * sizeof(base::char16),
- reinterpret_cast<uint8*>(vector_as_array(&data)));
+ reinterpret_cast<uint8*>(data.data()));
}
void PRegTestHarness::AppendPolicyToPRegFile(const base::string16& path,
« no previous file with comments | « components/policy/core/common/cloud/policy_builder.cc ('k') | components/policy/core/common/preg_parser_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698