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

Unified Diff: chrome/browser/policy/device_management_backend_impl.cc

Issue 7941008: Cosmetic cleanups in chrome/browser/policy/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload was broken? Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/device_management_backend_impl.cc
diff --git a/chrome/browser/policy/device_management_backend_impl.cc b/chrome/browser/policy/device_management_backend_impl.cc
index bbac2d600cc308852c9f7ead68b13d82ea1bb7c1..c111ad3e1788dea46ec5b5894761517af814784a 100644
--- a/chrome/browser/policy/device_management_backend_impl.cc
+++ b/chrome/browser/policy/device_management_backend_impl.cc
@@ -7,10 +7,6 @@
#include <utility>
#include <vector>
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
-#include <sys/utsname.h>
-#endif
-
#include "base/metrics/histogram.h"
#include "base/stringprintf.h"
#include "base/sys_info.h"
@@ -84,8 +80,6 @@ const char kMachineInfoHWClass[] = "hardware_class";
const char kMachineInfoBoard[] = "CHROMEOS_RELEASE_BOARD";
#endif
-} // namespace
-
// Helper class for URL query parameter encoding/decoding.
class URLQueryParameters {
public:
@@ -124,6 +118,8 @@ std::string URLQueryParameters::Encode() {
return result;
}
+} // namespace
+
// A base class containing the common code for the jobs created by the backend
// implementation. Subclasses provide custom code for handling actual register,
// unregister, and policy jobs.
@@ -322,7 +318,7 @@ class DeviceManagementRegisterJob : public DeviceManagementJobBase {
private:
// DeviceManagementJobBase overrides.
- virtual void OnError(DeviceManagementBackend::ErrorCode error) {
+ virtual void OnError(DeviceManagementBackend::ErrorCode error) OVERRIDE {
MetricToken sample;
switch (error) {
case DeviceManagementBackend::kErrorRequestInvalid:
@@ -351,7 +347,8 @@ class DeviceManagementRegisterJob : public DeviceManagementJobBase {
UMA_HISTOGRAM_ENUMERATION(kMetricToken, sample, kMetricTokenSize);
delegate_->OnError(error);
}
- virtual void OnResponse(const em::DeviceManagementResponse& response) {
+ virtual void OnResponse(
+ const em::DeviceManagementResponse& response) OVERRIDE {
UMA_HISTOGRAM_ENUMERATION(kMetricToken, kMetricTokenFetchResponseReceived,
kMetricTokenSize);
delegate_->HandleRegisterResponse(response.register_response());
@@ -385,10 +382,11 @@ class DeviceManagementUnregisterJob : public DeviceManagementJobBase {
private:
// DeviceManagementJobBase overrides.
- virtual void OnError(DeviceManagementBackend::ErrorCode error) {
+ virtual void OnError(DeviceManagementBackend::ErrorCode error) OVERRIDE {
delegate_->OnError(error);
}
- virtual void OnResponse(const em::DeviceManagementResponse& response) {
+ virtual void OnResponse(
+ const em::DeviceManagementResponse& response) OVERRIDE {
delegate_->HandleUnregisterResponse(response.unregister_response());
}
@@ -423,7 +421,7 @@ class DeviceManagementPolicyJob : public DeviceManagementJobBase {
private:
// DeviceManagementJobBase overrides.
- virtual void OnError(DeviceManagementBackend::ErrorCode error) {
+ virtual void OnError(DeviceManagementBackend::ErrorCode error) OVERRIDE {
MetricPolicy sample;
switch (error) {
case DeviceManagementBackend::kErrorRequestInvalid:
@@ -446,7 +444,8 @@ class DeviceManagementPolicyJob : public DeviceManagementJobBase {
UMA_HISTOGRAM_ENUMERATION(kMetricPolicy, sample, kMetricPolicySize);
delegate_->OnError(error);
}
- virtual void OnResponse(const em::DeviceManagementResponse& response) {
+ virtual void OnResponse(
+ const em::DeviceManagementResponse& response) OVERRIDE {
UMA_HISTOGRAM_ENUMERATION(kMetricPolicy, kMetricPolicyFetchResponseReceived,
kMetricPolicySize);
delegate_->HandlePolicyResponse(response.policy_response());
« no previous file with comments | « chrome/browser/policy/device_management_backend.h ('k') | chrome/browser/policy/device_management_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698