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

Side by Side Diff: components/policy/core/common/policy_loader_ios.h

Issue 213483004: Extended the iOS platform policy loader to load an additional key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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
« no previous file with comments | « no previous file | components/policy/core/common/policy_loader_ios.mm » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_IOS_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_IOS_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_IOS_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_IOS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 12 matching lines...) Expand all
23 virtual ~PolicyLoaderIOS(); 23 virtual ~PolicyLoaderIOS();
24 24
25 // AsyncPolicyLoader implementation. 25 // AsyncPolicyLoader implementation.
26 virtual void InitOnBackgroundThread() OVERRIDE; 26 virtual void InitOnBackgroundThread() OVERRIDE;
27 virtual scoped_ptr<PolicyBundle> Load() OVERRIDE; 27 virtual scoped_ptr<PolicyBundle> Load() OVERRIDE;
28 virtual base::Time LastModificationTime() OVERRIDE; 28 virtual base::Time LastModificationTime() OVERRIDE;
29 29
30 private: 30 private:
31 void UserDefaultsChanged(); 31 void UserDefaultsChanged();
32 32
33 // Loads the Chrome policies in |dictionary| into the given |bundle|.
34 static void LoadNSDictionaryToPolicyBundle(NSDictionary* dictionary,
35 PolicyBundle* bundle);
36
33 // Used to manage the registration for NSNotificationCenter notifications. 37 // Used to manage the registration for NSNotificationCenter notifications.
34 base::scoped_nsobject<id> notification_observer_; 38 base::scoped_nsobject<id> notification_observer_;
35 39
36 // Timestamp of the last notification. 40 // Timestamp of the last notification.
37 // Used to coalesce repeated notifications into a single Load() call. 41 // Used to coalesce repeated notifications into a single Load() call.
38 base::Time last_notification_time_; 42 base::Time last_notification_time_;
39 43
40 // Used to Bind() a WeakPtr to |this| for the callback passed to the 44 // Used to Bind() a WeakPtr to |this| for the callback passed to the
41 // |notification_observer_|. 45 // |notification_observer_|.
42 base::WeakPtrFactory<PolicyLoaderIOS> weak_factory_; 46 base::WeakPtrFactory<PolicyLoaderIOS> weak_factory_;
43 47
44 DISALLOW_COPY_AND_ASSIGN(PolicyLoaderIOS); 48 DISALLOW_COPY_AND_ASSIGN(PolicyLoaderIOS);
45 }; 49 };
46 50
47 } // namespace policy 51 } // namespace policy
48 52
49 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_IOS_H_ 53 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_LOADER_IOS_H_
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/policy_loader_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698