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

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: Nested pragmas 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
Nico 2015/07/08 05:17:27 alternatively `#ifdef __clang__` i guess. Do you
dcheng 2015/07/08 08:02:49 This seems to work. Done.
89 #pragma clang diagnostic push
90 // TODO(dcheng): Remove pragma once http://llvm.org/PR24007 is fixed.
91 #pragma clang diagnostic ignored "-Wmissing-braces"
87 // The GUID of the registry settings group policy extension. 92 // The GUID of the registry settings group policy extension.
88 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID; 93 GUID kRegistrySettingsCSEGUID = REGISTRY_EXTENSION_GUID;
94 #pragma clang diagnostic pop
95 #pragma warning(pop)
89 96
90 // The list of possible errors that can occur while collecting information about 97 // The list of possible errors that can occur while collecting information about
91 // the current enterprise environment. 98 // the current enterprise environment.
92 // This enum is used to define the buckets for an enumerated UMA histogram. 99 // This enum is used to define the buckets for an enumerated UMA histogram.
93 // Hence, 100 // Hence,
94 // (a) existing enumerated constants should never be deleted or reordered, and 101 // (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. 102 // (b) new constants should only be appended at the end of the enumeration.
96 enum DomainCheckErrors { 103 enum DomainCheckErrors {
97 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0, 104 DOMAIN_CHECK_ERROR_GET_JOIN_INFO = 0,
98 DOMAIN_CHECK_ERROR_DS_BIND = 1, 105 DOMAIN_CHECK_ERROR_DS_BIND = 1,
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 691
685 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) { 692 void PolicyLoaderWin::OnObjectSignaled(HANDLE object) {
686 DCHECK(object == user_policy_changed_event_.handle() || 693 DCHECK(object == user_policy_changed_event_.handle() ||
687 object == machine_policy_changed_event_.handle()) 694 object == machine_policy_changed_event_.handle())
688 << "unexpected object signaled policy reload, obj = " 695 << "unexpected object signaled policy reload, obj = "
689 << std::showbase << std::hex << object; 696 << std::showbase << std::hex << object;
690 Reload(false); 697 Reload(false);
691 } 698 }
692 699
693 } // namespace policy 700 } // 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