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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 | « chrome/browser/policy/user_policy_disk_cache.cc ('k') | chrome/browser/prefs/pref_member.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/user_policy_token_cache.h" 5 #include "chrome/browser/policy/user_policy_token_cache.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/policy/enterprise_metrics.h" 10 #include "chrome/browser/policy/enterprise_metrics.h"
11 #include "chrome/browser/policy/proto/device_management_local.pb.h" 11 #include "chrome/browser/policy/proto/device_management_local.pb.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 13
14 using content::BrowserThread;
15
14 namespace { 16 namespace {
15 17
16 // Other places can sample on the same UMA counter, so make sure they all do 18 // Other places can sample on the same UMA counter, so make sure they all do
17 // it on the same thread (UI). 19 // it on the same thread (UI).
18 void SampleUMAOnUIThread(policy::MetricToken sample) { 20 void SampleUMAOnUIThread(policy::MetricToken sample) {
19 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
20 UMA_HISTOGRAM_ENUMERATION(policy::kMetricToken, sample, 22 UMA_HISTOGRAM_ENUMERATION(policy::kMetricToken, sample,
21 policy::kMetricTokenSize); 23 policy::kMetricTokenSize);
22 } 24 }
23 25
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 165
164 token_ = new_token; 166 token_ = new_token;
165 loader_->Store(new_token, data_store_->device_id()); 167 loader_->Store(new_token, data_store_->device_id());
166 } 168 }
167 } 169 }
168 170
169 void UserPolicyTokenCache::OnCredentialsChanged() { 171 void UserPolicyTokenCache::OnCredentialsChanged() {
170 } 172 }
171 173
172 } // namespace policy 174 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/user_policy_disk_cache.cc ('k') | chrome/browser/prefs/pref_member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698