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

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

Issue 1719983005: base: Stop overloading ReadFileToString() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix errors Created 4 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
« no previous file with comments | « base/files/file_util_unittest.cc ('k') | chrome/browser/ui/webui/test_files_request_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
index 96e73e0f7371c34a3dbccba6e734d8e888cbd59f..369a49494216f97cfbe33ce112d0feeeaea1672d 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
@@ -500,7 +500,8 @@ void UserCloudPolicyStoreChromeOS::LoadPolicyKey(const base::FilePath& path,
return;
}
- const bool read_success = base::ReadFileToString(path, key, kKeySizeLimit);
+ const bool read_success =
+ base::ReadFileToStringWithMaxSize(path, key, kKeySizeLimit);
// If the read was successful and the file size is 0 or if the read fails
// due to file size exceeding |kKeySizeLimit|, log error.
if ((read_success && key->length() == 0) ||
« no previous file with comments | « base/files/file_util_unittest.cc ('k') | chrome/browser/ui/webui/test_files_request_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698