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

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

Issue 925783002: Split ValueSerializer into separate Serializer and Deserializer classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed cpplint warnings. Created 5 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 | « components/omnibox/search_suggestion_parser.cc ('k') | components/update_client/component_patcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/config_dir_policy_loader.cc
diff --git a/components/policy/core/common/config_dir_policy_loader.cc b/components/policy/core/common/config_dir_policy_loader.cc
index c7541906cd82637c439b45e5ab17591f5899f8d7..b39d8385bbfca48e5a653a9edf7862bf74fc27bf 100644
--- a/components/policy/core/common/config_dir_policy_loader.cc
+++ b/components/policy/core/common/config_dir_policy_loader.cc
@@ -31,11 +31,11 @@ const base::FilePath::CharType kRecommendedConfigDir[] =
PolicyLoadStatus JsonErrorToPolicyLoadStatus(int status) {
switch (status) {
- case JSONFileValueSerializer::JSON_ACCESS_DENIED:
- case JSONFileValueSerializer::JSON_CANNOT_READ_FILE:
- case JSONFileValueSerializer::JSON_FILE_LOCKED:
+ case JSONFileValueDeserializer::JSON_ACCESS_DENIED:
+ case JSONFileValueDeserializer::JSON_CANNOT_READ_FILE:
+ case JSONFileValueDeserializer::JSON_FILE_LOCKED:
return POLICY_LOAD_STATUS_READ_ERROR;
- case JSONFileValueSerializer::JSON_NO_SUCH_FILE:
+ case JSONFileValueDeserializer::JSON_NO_SUCH_FILE:
return POLICY_LOAD_STATUS_MISSING;
case base::JSONReader::JSON_INVALID_ESCAPE:
case base::JSONReader::JSON_SYNTAX_ERROR:
@@ -138,7 +138,7 @@ void ConfigDirPolicyLoader::LoadFromPath(const base::FilePath& path,
for (std::set<base::FilePath>::reverse_iterator config_file_iter =
files.rbegin(); config_file_iter != files.rend();
++config_file_iter) {
- JSONFileValueSerializer deserializer(*config_file_iter);
+ JSONFileValueDeserializer deserializer(*config_file_iter);
deserializer.set_allow_trailing_comma(true);
int error_code = 0;
std::string error_msg;
« no previous file with comments | « components/omnibox/search_suggestion_parser.cc ('k') | components/update_client/component_patcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698