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

Side by Side Diff: components/policy/core/common/policy_loader_win.cc

Issue 1216413002: Fix remaining warnings for -Wmissing-braces and enable on win clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Less nesting Created 5 years, 5 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 | « cloud_print/service/win/service.gyp ('k') | remoting/remoting_host_win.gypi » ('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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/common/policy_loader_win.h" 5 #include "components/policy/core/common/policy_loader_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <lm.h> // For limits. 8 #include <lm.h> // For limits.
9 #include <ntdsapi.h> // For Ds[Un]Bind 9 #include <ntdsapi.h> // For Ds[Un]Bind
10 #include <rpc.h> // For struct GUID 10 #include <rpc.h> // For struct GUID
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Please document any new additions in policy_templates.json! 77 // Please document any new additions in policy_templates.json!
78 const char* kInsecurePolicies[] = { 78 const char* kInsecurePolicies[] = {
79 key::kMetricsReportingEnabled, 79 key::kMetricsReportingEnabled,
80 key::kDefaultSearchProviderEnabled, 80 key::kDefaultSearchProviderEnabled,
81 key::kHomepageIsNewTabPage, 81 key::kHomepageIsNewTabPage,
82 key::kHomepageLocation, 82 key::kHomepageLocation,
83 key::kRestoreOnStartup, 83 key::kRestoreOnStartup,
84 key::kRestoreOnStartupURLs 84 key::kRestoreOnStartupURLs
85 }; 85 };
86 86
87 #pragma warning(push)
88 #pragma warning(disable: 4068) // unknown pragmas
89 // TODO(dcheng): Remove pragma once http://llvm.org/PR24007 is fixed.
90 #pragma clang diagnostic ignored "-Wmissing-braces"
87 // The GUID of the registry settings group policy extension. 91 // The GUID of the registry settings group policy extension.
88 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID; 92 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID;
93 #pragma warning(pop)
89 94
90 // The list of possible errors that can occur while collecting information about 95 // The list of possible errors that can occur while collecting information about
91 // the current enterprise environment. 96 // the current enterprise environment.
92 // This enum is used to define the buckets for an enumerated UMA histogram. 97 // This enum is used to define the buckets for an enumerated UMA histogram.
93 // Hence, 98 // Hence,
94 // (a) existing enumerated constants should never be deleted or reordered, and 99 // (a) existing enumerated constants should never be deleted or reordered, and
95 // (b) new constants should only be appended at the end of the enumeration. 100 // (b) new constants should only be appended at the end of the enumeration.
96 enum DomainCheckErrors { 101 enum DomainCheckErrors {
97 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0, 102 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0,
98 DOMAIN_CHECK_ERROR_DS_BIND = 1, 103 DOMAIN_CHECK_ERROR_DS_BIND = 1,
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 689
685 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { 690 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) {
686 DCHECK(object == user_policy_changed_event_.handle() || 691 DCHECK(object == user_policy_changed_event_.handle() ||
687 object == machine_policy_changed_event_.handle()) 692 object == machine_policy_changed_event_.handle())
688 << "unexpected object signaled policy reload, obj = " 693 << "unexpected object signaled policy reload, obj = "
689 << std::showbase << std::hex << object; 694 << std::showbase << std::hex << object;
690 Reload(false); 695 Reload(false);
691 } 696 }
692 697
693 } // namespace policy 698 } // namespace policy
OLDNEW
« no previous file with comments | « cloud_print/service/win/service.gyp ('k') | remoting/remoting_host_win.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698