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

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

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PREFERENCES_MOCK_MAC_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_
7 7
8 #include "base/mac/scoped_cftyperef.h" 8 #include "base/mac/scoped_cftyperef.h"
9 #include "components/policy/core/common/preferences_mac.h" 9 #include "components/policy/core/common/preferences_mac.h"
10 #include "components/policy/policy_export.h" 10 #include "components/policy/policy_export.h"
11 11
12 // Mock preferences wrapper for testing code that interacts with CFPreferences. 12 // Mock preferences wrapper for testing code that interacts with CFPreferences.
13 class POLICY_EXPORT MockPreferences : public MacPreferences { 13 class POLICY_EXPORT MockPreferences : public MacPreferences {
14 public: 14 public:
15 MockPreferences(); 15 MockPreferences();
16 virtual ~MockPreferences(); 16 ~MockPreferences() override;
17 17
18 virtual Boolean AppSynchronize(CFStringRef applicationID) override; 18 Boolean AppSynchronize(CFStringRef applicationID) override;
19 19
20 virtual CFPropertyListRef CopyAppValue(CFStringRef key, 20 CFPropertyListRef CopyAppValue(CFStringRef key,
21 CFStringRef applicationID) override; 21 CFStringRef applicationID) override;
22 22
23 virtual Boolean AppValueIsForced(CFStringRef key, 23 Boolean AppValueIsForced(CFStringRef key, CFStringRef applicationID) override;
24 CFStringRef applicationID) override;
25 24
26 // Adds a preference item with the given info to the test set. 25 // Adds a preference item with the given info to the test set.
27 void AddTestItem(CFStringRef key, CFPropertyListRef value, bool is_forced); 26 void AddTestItem(CFStringRef key, CFPropertyListRef value, bool is_forced);
28 27
29 private: 28 private:
30 base::ScopedCFTypeRef<CFMutableDictionaryRef> values_; 29 base::ScopedCFTypeRef<CFMutableDictionaryRef> values_;
31 base::ScopedCFTypeRef<CFMutableSetRef> forced_; 30 base::ScopedCFTypeRef<CFMutableSetRef> forced_;
32 }; 31 };
33 32
34 #endif // COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_ 33 #endif // COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_service_impl_unittest.cc ('k') | components/policy/core/common/schema_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698