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

Side by Side Diff: chrome/browser/chromeos/policy/user_policy_disk_cache.cc

Issue 14008005: Move proto files back into chrome/browser/policy/proto (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 (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 #include "chrome/browser/chromeos/policy/user_policy_disk_cache.h" 5 #include "chrome/browser/chromeos/policy/user_policy_disk_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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "chrome/browser/policy/cloud/enterprise_metrics.h" 11 #include "chrome/browser/policy/cloud/enterprise_metrics.h"
12 #include "chrome/browser/policy/cloud/proto/device_management_local.pb.h" 12 #include "chrome/browser/policy/proto/cloud/device_management_local.pb.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 14
15 using content::BrowserThread; 15 using content::BrowserThread;
16 16
17 namespace em = enterprise_management; 17 namespace em = enterprise_management;
18 18
19 namespace { 19 namespace {
20 20
21 // Other places can sample on the same UMA counter, so make sure they all do 21 // Other places can sample on the same UMA counter, so make sure they all do
22 // it on the same thread (UI). 22 // it on the same thread (UI).
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 int size = data.size(); 140 int size = data.size();
141 if (file_util::WriteFile(backing_file_path_, data.c_str(), size) != size) { 141 if (file_util::WriteFile(backing_file_path_, data.c_str(), size) != size) {
142 LOG(WARNING) << "Failed to write " << backing_file_path_.value(); 142 LOG(WARNING) << "Failed to write " << backing_file_path_.value();
143 SampleUMA(kMetricPolicyStoreFailed); 143 SampleUMA(kMetricPolicyStoreFailed);
144 return; 144 return;
145 } 145 }
146 SampleUMA(kMetricPolicyStoreSucceeded); 146 SampleUMA(kMetricPolicyStoreSucceeded);
147 } 147 }
148 148
149 } // namespace policy 149 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698