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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/policy/user_cloud_policy_store_chromeos_unittest.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
index 2d1f76425ef6e906e6691ac31ced90d60a7e6967..6ab114b7f89cd2cd6e95fdde7dc55713d5ed3342 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc
@@ -127,9 +127,9 @@ class UserCloudPolicyStoreChromeOSTest : public testing::Test {
void StoreUserPolicyKey(const std::vector<uint8>& public_key) {
ASSERT_TRUE(base::CreateDirectory(user_policy_key_file().DirName()));
ASSERT_TRUE(
- file_util::WriteFile(user_policy_key_file(),
- reinterpret_cast<const char*>(public_key.data()),
- public_key.size()));
+ base::WriteFile(user_policy_key_file(),
+ reinterpret_cast<const char*>(public_key.data()),
+ public_key.size()));
}
// Stores the current |policy_| and verifies that it is published.
@@ -400,12 +400,12 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationFull) {
credentials.set_device_token(kLegacyToken);
credentials.set_device_id(kLegacyDeviceId);
ASSERT_TRUE(credentials.SerializeToString(&data));
- ASSERT_NE(-1, file_util::WriteFile(token_file(), data.c_str(), data.size()));
+ ASSERT_NE(-1, base::WriteFile(token_file(), data.c_str(), data.size()));
em::CachedCloudPolicyResponse cached_policy;
cached_policy.mutable_cloud_policy()->CopyFrom(policy_.policy());
ASSERT_TRUE(cached_policy.SerializeToString(&data));
- ASSERT_NE(-1, file_util::WriteFile(policy_file(), data.c_str(), data.size()));
+ ASSERT_NE(-1, base::WriteFile(policy_file(), data.c_str(), data.size()));
EXPECT_CALL(observer_, OnStoreLoaded(store_.get()));
ASSERT_NO_FATAL_FAILURE(PerformPolicyLoad(""));
@@ -432,7 +432,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationNoToken) {
em::CachedCloudPolicyResponse cached_policy;
cached_policy.mutable_cloud_policy()->CopyFrom(policy_.policy());
ASSERT_TRUE(cached_policy.SerializeToString(&data));
- ASSERT_NE(-1, file_util::WriteFile(policy_file(), data.c_str(), data.size()));
+ ASSERT_NE(-1, base::WriteFile(policy_file(), data.c_str(), data.size()));
EXPECT_CALL(observer_, OnStoreLoaded(store_.get()));
ASSERT_NO_FATAL_FAILURE(PerformPolicyLoad(""));
@@ -457,7 +457,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationNoPolicy) {
credentials.set_device_token(kLegacyToken);
credentials.set_device_id(kLegacyDeviceId);
ASSERT_TRUE(credentials.SerializeToString(&data));
- ASSERT_NE(-1, file_util::WriteFile(token_file(), data.c_str(), data.size()));
+ ASSERT_NE(-1, base::WriteFile(token_file(), data.c_str(), data.size()));
EXPECT_CALL(observer_, OnStoreLoaded(store_.get()));
ASSERT_NO_FATAL_FAILURE(PerformPolicyLoad(""));
@@ -482,7 +482,7 @@ TEST_F(UserCloudPolicyStoreChromeOSTest, MigrationAndStoreNew) {
em::CachedCloudPolicyResponse cached_policy;
cached_policy.mutable_cloud_policy()->CopyFrom(policy_.policy());
ASSERT_TRUE(cached_policy.SerializeToString(&data));
- ASSERT_NE(-1, file_util::WriteFile(policy_file(), data.c_str(), data.size()));
+ ASSERT_NE(-1, base::WriteFile(policy_file(), data.c_str(), data.size()));
EXPECT_CALL(observer_, OnStoreLoaded(store_.get()));
ASSERT_NO_FATAL_FAILURE(PerformPolicyLoad(""));
« no previous file with comments | « chrome/browser/chromeos/policy/power_policy_browsertest.cc ('k') | chrome/browser/chromeos/policy/user_policy_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698