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

Side by Side Diff: chrome/browser/policy/policy_path_parser_win.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <shlobj.h> 5 #include <shlobj.h>
6 #include <stddef.h>
6 #include <wtsapi32.h> 7 #include <wtsapi32.h>
7 #pragma comment(lib, "wtsapi32.lib") 8 #pragma comment(lib, "wtsapi32.lib")
8 9
9 #include "chrome/browser/policy/policy_path_parser.h" 10 #include "chrome/browser/policy/policy_path_parser.h"
10 11
12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
13 #include "base/win/registry.h" 15 #include "base/win/registry.h"
14 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
15 #include "policy/policy_constants.h" 17 #include "policy/policy_constants.h"
16 18
17 namespace { 19 namespace {
18 20
19 // Checks if the key exists in the given hive and expands any string variables. 21 // Checks if the key exists in the given hive and expands any string variables.
20 bool LoadUserDataDirPolicyFromRegistry(HKEY hive, base::FilePath* dir) { 22 bool LoadUserDataDirPolicyFromRegistry(HKEY hive, base::FilePath* dir) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void CheckUserDataDirPolicy(base::FilePath* user_data_dir) { 147 void CheckUserDataDirPolicy(base::FilePath* user_data_dir) {
146 DCHECK(user_data_dir); 148 DCHECK(user_data_dir);
147 // Policy from the HKLM hive has precedence over HKCU. 149 // Policy from the HKLM hive has precedence over HKCU.
148 if (!LoadUserDataDirPolicyFromRegistry(HKEY_LOCAL_MACHINE, user_data_dir)) 150 if (!LoadUserDataDirPolicyFromRegistry(HKEY_LOCAL_MACHINE, user_data_dir))
149 LoadUserDataDirPolicyFromRegistry(HKEY_CURRENT_USER, user_data_dir); 151 LoadUserDataDirPolicyFromRegistry(HKEY_CURRENT_USER, user_data_dir);
150 } 152 }
151 153
152 } // namespace path_parser 154 } // namespace path_parser
153 155
154 } // namespace policy 156 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_path_parser_unittest.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698