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

Side by Side Diff: components/policy/core/common/policy_loader_mac.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/policy_loader_mac.h" 5 #include "components/policy/core/common/policy_loader_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (!policy_present) 112 if (!policy_present)
113 status.Add(POLICY_LOAD_STATUS_NO_POLICY); 113 status.Add(POLICY_LOAD_STATUS_NO_POLICY);
114 114
115 // Load policy for the registered components. 115 // Load policy for the registered components.
116 LoadPolicyForDomain(POLICY_DOMAIN_EXTENSIONS, "extensions", bundle.get()); 116 LoadPolicyForDomain(POLICY_DOMAIN_EXTENSIONS, "extensions", bundle.get());
117 117
118 return bundle.Pass(); 118 return bundle.Pass();
119 } 119 }
120 120
121 base::Time PolicyLoaderMac::LastModificationTime() { 121 base::Time PolicyLoaderMac::LastModificationTime() {
122 base::PlatformFileInfo file_info; 122 base::File::Info file_info;
123 if (!base::GetFileInfo(managed_policy_path_, &file_info) || 123 if (!base::GetFileInfo(managed_policy_path_, &file_info) ||
124 file_info.is_directory) { 124 file_info.is_directory) {
125 return base::Time(); 125 return base::Time();
126 } 126 }
127 127
128 return file_info.last_modified; 128 return file_info.last_modified;
129 } 129 }
130 130
131 // static 131 // static
132 base::Value* PolicyLoaderMac::CreateValueFromProperty( 132 base::Value* PolicyLoaderMac::CreateValueFromProperty(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 } 226 }
227 } 227 }
228 228
229 void PolicyLoaderMac::OnFileUpdated(const base::FilePath& path, bool error) { 229 void PolicyLoaderMac::OnFileUpdated(const base::FilePath& path, bool error) {
230 if (!error) 230 if (!error)
231 Reload(false); 231 Reload(false);
232 } 232 }
233 233
234 } // namespace policy 234 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/config_dir_policy_loader.cc ('k') | content/browser/fileapi/blob_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698