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

Side by Side Diff: components/policy/core/browser/configuration_policy_handler.cc

Issue 171403004: Add touch flag to output of Schema::Normalize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split-1
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/policy/core/common/schema.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/policy/core/browser/configuration_policy_handler.h" 5 #include "components/policy/core/browser/configuration_policy_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 PolicyErrorMap* errors, 338 PolicyErrorMap* errors,
339 scoped_ptr<base::Value>* output) { 339 scoped_ptr<base::Value>* output) {
340 const base::Value* value = policies.GetValue(policy_name()); 340 const base::Value* value = policies.GetValue(policy_name());
341 if (!value) 341 if (!value)
342 return true; 342 return true;
343 343
344 output->reset(value->DeepCopy()); 344 output->reset(value->DeepCopy());
345 std::string error_path; 345 std::string error_path;
346 std::string error; 346 std::string error;
347 bool result = 347 bool result =
348 schema_.Normalize(output->get(), strategy_, &error_path, &error); 348 schema_.Normalize(output->get(), strategy_, &error_path, &error, NULL);
349 349
350 if (errors && !error.empty()) { 350 if (errors && !error.empty()) {
351 if (error_path.empty()) 351 if (error_path.empty())
352 error_path = "(ROOT)"; 352 error_path = "(ROOT)";
353 errors->AddError(policy_name_, error_path, error); 353 errors->AddError(policy_name_, error_path, error);
354 } 354 }
355 355
356 return result; 356 return result;
357 } 357 }
358 358
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 for (handler = legacy_policy_handlers_.begin(); 404 for (handler = legacy_policy_handlers_.begin();
405 handler != legacy_policy_handlers_.end(); 405 handler != legacy_policy_handlers_.end();
406 ++handler) { 406 ++handler) {
407 if ((*handler)->CheckPolicySettings(policies, &scoped_errors)) 407 if ((*handler)->CheckPolicySettings(policies, &scoped_errors))
408 (*handler)->ApplyPolicySettings(policies, prefs); 408 (*handler)->ApplyPolicySettings(policies, prefs);
409 } 409 }
410 } 410 }
411 } 411 }
412 412
413 } // namespace policy 413 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/schema.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698