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

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

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 "chrome/browser/policy/policy_loader_mac.h" 5 #include "chrome/browser/policy/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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::PlatformFileInfo file_info;
123 if (!file_util::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(
133 CFPropertyListRef property) { 133 CFPropertyListRef property) {
(...skipping 91 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 | « chrome/browser/policy/config_dir_policy_loader.cc ('k') | chrome/browser/safe_browsing/safe_browsing_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698