OLD | NEW |
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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/time/time.h" |
14 #include "chrome/browser/policy/cloud/cloud_policy_client.h" | 15 #include "chrome/browser/policy/cloud/cloud_policy_client.h" |
15 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 16 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" |
16 #include "chrome/browser/policy/cloud/cloud_policy_manager.h" | 17 #include "chrome/browser/policy/cloud/cloud_policy_manager.h" |
17 #include "chrome/browser/policy/cloud/cloud_policy_service.h" | 18 #include "chrome/browser/policy/cloud/cloud_policy_service.h" |
18 #include "chrome/browser/policy/cloud/component_cloud_policy_service.h" | 19 #include "chrome/browser/policy/cloud/component_cloud_policy_service.h" |
19 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 20 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
20 | 21 |
21 class GoogleServiceAuthError; | 22 class GoogleServiceAuthError; |
22 class PrefService; | 23 class PrefService; |
23 | 24 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 PrefService* local_state_; | 128 PrefService* local_state_; |
128 | 129 |
129 // Used to fetch the policy OAuth token, when necessary. This object holds | 130 // Used to fetch the policy OAuth token, when necessary. This object holds |
130 // a callback with an unretained reference to the manager, when it exists. | 131 // a callback with an unretained reference to the manager, when it exists. |
131 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; | 132 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; |
132 | 133 |
133 // The access token passed to OnAccessTokenAvailable. It is stored here so | 134 // The access token passed to OnAccessTokenAvailable. It is stored here so |
134 // that it can be used if OnInitializationCompleted is called later. | 135 // that it can be used if OnInitializationCompleted is called later. |
135 std::string access_token_; | 136 std::string access_token_; |
136 | 137 |
| 138 // Timestamps for collecting timing UMA stats. |
| 139 base::Time time_init_started_; |
| 140 base::Time time_init_completed_; |
| 141 base::Time time_token_available_; |
| 142 base::Time time_client_registered_; |
| 143 |
137 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); | 144 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManagerChromeOS); |
138 }; | 145 }; |
139 | 146 |
140 } // namespace policy | 147 } // namespace policy |
141 | 148 |
142 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ | 149 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_CLOUD_POLICY_MANAGER_CHROMEOS_H_ |
OLD | NEW |