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

Side by Side Diff: chrome/browser/metrics/chromeos_metrics_provider.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/metrics/chromeos_metrics_provider.h" 5 #include "chrome/browser/metrics/chromeos_metrics_provider.h"
6 6
7 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 EnrollmentStatus GetEnrollmentStatus() { 108 EnrollmentStatus GetEnrollmentStatus() {
109 policy::BrowserPolicyConnectorChromeOS* connector = 109 policy::BrowserPolicyConnectorChromeOS* connector =
110 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 110 g_browser_process->platform_part()->browser_policy_connector_chromeos();
111 if (!connector) 111 if (!connector)
112 return ERROR_GETTING_ENROLLMENT_STATUS; 112 return ERROR_GETTING_ENROLLMENT_STATUS;
113 113
114 if (!connector->IsEnterpriseManaged()) 114 if (!connector->IsEnterpriseManaged())
115 return NON_MANAGED; 115 return NON_MANAGED;
116 116
117 std::string domain = connector->GetEnterpriseDomain(); 117 std::string domain = connector->GetEnterpriseDomain();
118 if (EndsWith(domain, kEduDomain, false /* case insensitive */)) 118 if (base::EndsWith(domain, kEduDomain, false /* case insensitive */))
119 return MANAGED_EDU; 119 return MANAGED_EDU;
120 120
121 return MANAGED_NON_EDU; 121 return MANAGED_NON_EDU;
122 } 122 }
123 123
124 } // namespace 124 } // namespace
125 125
126 ChromeOSMetricsProvider::ChromeOSMetricsProvider() 126 ChromeOSMetricsProvider::ChromeOSMetricsProvider()
127 : registered_user_count_at_log_initialization_(false), 127 : registered_user_count_at_log_initialization_(false),
128 user_count_at_log_initialization_(0), 128 user_count_at_log_initialization_(0),
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 void ChromeOSMetricsProvider::SetBluetoothAdapter( 316 void ChromeOSMetricsProvider::SetBluetoothAdapter(
317 scoped_refptr<device::BluetoothAdapter> adapter) { 317 scoped_refptr<device::BluetoothAdapter> adapter) {
318 adapter_ = adapter; 318 adapter_ = adapter;
319 } 319 }
320 320
321 void ChromeOSMetricsProvider::RecordEnrollmentStatus() { 321 void ChromeOSMetricsProvider::RecordEnrollmentStatus() {
322 UMA_HISTOGRAM_ENUMERATION( 322 UMA_HISTOGRAM_ENUMERATION(
323 "UMA.EnrollmentStatus", GetEnrollmentStatus(), ENROLLMENT_STATUS_MAX); 323 "UMA.EnrollmentStatus", GetEnrollmentStatus(), ENROLLMENT_STATUS_MAX);
324 } 324 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/local_extension_cache.cc ('k') | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698