summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authorhashimoto <hashimoto@chromium.org>2016-02-23 19:39:58 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-24 03:41:18 +0000
commit6da2fef05a6d503710e5f9b6f1363d94eac7c633 (patch)
tree0555ad23af0411705c52f2d218e75c20779548f5 /remoting/host
parentad0d07421f17d5d822994cf906412f0d9788d500 (diff)
downloadchromium_src-6da2fef05a6d503710e5f9b6f1363d94eac7c633.zip
chromium_src-6da2fef05a6d503710e5f9b6f1363d94eac7c633.tar.gz
chromium_src-6da2fef05a6d503710e5f9b6f1363d94eac7c633.tar.bz2
base: Stop overloading ReadFileToString()
With the existing code, base::Bind(&base::ReadFileToString) doesn't compile because the compiler cannot infer the argument's type (2-argument version or 3-argument version). base::Bind<bool(*)(const base::FilePath&, std::string*)>(&base::ReadFileToString) compiles but it doesn't look desirable. As our style guide discourages function overloading(*), rename the 3-argument version (added in http://crrev.com/157593005) to stop overloading. *https://google.github.io/styleguide/cppguide.html#Function_Overloading BUG=None TBR=sgurun@chromium.org for android_webview, derat@chromium.org for chromeos/accelerometer, bartfab@chromium.org for components/policy, dsinclair@chromium.org for components/tracing, estade@chromium.org for content/browser/webui, sergeyu@chromium.org for remoting Review URL: https://codereview.chromium.org/1719983005 Cr-Commit-Position: refs/heads/master@{#377209}
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/setup/daemon_controller_delegate_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/remoting/host/setup/daemon_controller_delegate_win.cc b/remoting/host/setup/daemon_controller_delegate_win.cc
index baab288..91e7267 100644
--- a/remoting/host/setup/daemon_controller_delegate_win.cc
+++ b/remoting/host/setup/daemon_controller_delegate_win.cc
@@ -68,7 +68,8 @@ const char* const kUnprivilegedConfigKeys[] = {
bool ReadConfig(const base::FilePath& filename,
scoped_ptr<base::DictionaryValue>* config_out) {
std::string file_content;
- if (!base::ReadFileToString(filename, &file_content, kMaxConfigFileSize)) {
+ if (!base::ReadFileToStringWithMaxSize(filename, &file_content,
+ kMaxConfigFileSize)) {
PLOG(ERROR) << "Failed to read '" << filename.value() << "'.";
return false;
}