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

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

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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 | Annotate | Revision Log
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/common/config_dir_policy_loader.h" 5 #include "components/policy/core/common/config_dir_policy_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return bundle.Pass(); 85 return bundle.Pass();
86 } 86 }
87 87
88 base::Time ConfigDirPolicyLoader::LastModificationTime() { 88 base::Time ConfigDirPolicyLoader::LastModificationTime() {
89 static const base::FilePath::CharType* kConfigDirSuffixes[] = { 89 static const base::FilePath::CharType* kConfigDirSuffixes[] = {
90 kMandatoryConfigDir, 90 kMandatoryConfigDir,
91 kRecommendedConfigDir, 91 kRecommendedConfigDir,
92 }; 92 };
93 93
94 base::Time last_modification = base::Time(); 94 base::Time last_modification = base::Time();
95 base::PlatformFileInfo info; 95 base::File::Info info;
96 96
97 for (size_t i = 0; i < arraysize(kConfigDirSuffixes); ++i) { 97 for (size_t i = 0; i < arraysize(kConfigDirSuffixes); ++i) {
98 base::FilePath path(config_dir_.Append(kConfigDirSuffixes[i])); 98 base::FilePath path(config_dir_.Append(kConfigDirSuffixes[i]));
99 99
100 // Skip if the file doesn't exist, or it isn't a directory. 100 // Skip if the file doesn't exist, or it isn't a directory.
101 if (!base::GetFileInfo(path, &info) || !info.is_directory) 101 if (!base::GetFileInfo(path, &info) || !info.is_directory)
102 continue; 102 continue;
103 103
104 // Enumerate the files and find the most recent modification timestamp. 104 // Enumerate the files and find the most recent modification timestamp.
105 base::FileEnumerator file_enumerator(path, false, 105 base::FileEnumerator file_enumerator(path, false,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 } 224 }
225 225
226 void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path, 226 void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path,
227 bool error) { 227 bool error) {
228 if (!error) 228 if (!error)
229 Reload(false); 229 Reload(false);
230 } 230 }
231 231
232 } // namespace policy 232 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | components/policy/core/common/policy_loader_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698