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

Side by Side Diff: components/policy/core/common/cloud/policy_header_service.h

Issue 303993005: Add browser test for ChromeResourceDispatcherHostDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use-after-free of ResourceDispatcherHostDelegate in test. Created 6 years, 6 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 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_CLOUD_POLICY_HEADER_SERVICE_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_HEADER_SERVICE_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_HEADER_SERVICE_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_HEADER_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 29 matching lines...) Expand all
40 // this object and must ensure it outlives ProfileHeaderService (in practice, 40 // this object and must ensure it outlives ProfileHeaderService (in practice,
41 // this is called by ProfileIOData, which is shutdown *after* all 41 // this is called by ProfileIOData, which is shutdown *after* all
42 // ProfileKeyedServices are shutdown). 42 // ProfileKeyedServices are shutdown).
43 scoped_ptr<PolicyHeaderIOHelper> CreatePolicyHeaderIOHelper( 43 scoped_ptr<PolicyHeaderIOHelper> CreatePolicyHeaderIOHelper(
44 scoped_refptr<base::SequencedTaskRunner> task_runner); 44 scoped_refptr<base::SequencedTaskRunner> task_runner);
45 45
46 // Overridden CloudPolicyStore::Observer methods: 46 // Overridden CloudPolicyStore::Observer methods:
47 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE; 47 virtual void OnStoreLoaded(CloudPolicyStore* store) OVERRIDE;
48 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE; 48 virtual void OnStoreError(CloudPolicyStore* store) OVERRIDE;
49 49
50 // Returns a list of all PolicyHeaderIOHelpers created by this object.
51 std::vector<PolicyHeaderIOHelper*> GetHelpersForTest();
52
50 private: 53 private:
51 // Generate a policy header based on the currently loaded policy. 54 // Generate a policy header based on the currently loaded policy.
52 std::string CreateHeaderValue(); 55 std::string CreateHeaderValue();
53 56
54 // Weak pointer to created PolicyHeaderIOHelper objects. 57 // Weak pointer to created PolicyHeaderIOHelper objects.
55 std::vector<PolicyHeaderIOHelper*> helpers_; 58 std::vector<PolicyHeaderIOHelper*> helpers_;
56 59
57 // URL of the policy server. 60 // URL of the policy server.
58 std::string server_url_; 61 std::string server_url_;
59 62
60 // Identifier for the verification key this Chrome instance is using. 63 // Identifier for the verification key this Chrome instance is using.
61 std::string verification_key_hash_; 64 std::string verification_key_hash_;
62 65
63 // Weak pointers to User-/Device-level policy stores. 66 // Weak pointers to User-/Device-level policy stores.
64 CloudPolicyStore* user_policy_store_; 67 CloudPolicyStore* user_policy_store_;
65 CloudPolicyStore* device_policy_store_; 68 CloudPolicyStore* device_policy_store_;
66 69
67 DISALLOW_COPY_AND_ASSIGN(PolicyHeaderService); 70 DISALLOW_COPY_AND_ASSIGN(PolicyHeaderService);
68 }; 71 };
69 72
70 } // namespace policy 73 } // namespace policy
71 74
72 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_HEADER_SERVICE_H_ 75 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_HEADER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698