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

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

Issue 12033021: Add UMA metrics and histograms for locally managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/policy/url_blacklist_manager.h" 5 #include "chrome/browser/policy/url_blacklist_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 max = &filter; 134 max = &filter;
135 } 135 }
136 136
137 // Default to allow. 137 // Default to allow.
138 if (!max) 138 if (!max)
139 return false; 139 return false;
140 140
141 return !max->allow; 141 return !max->allow;
142 } 142 }
143 143
144 size_t URLBlacklist::Size() const {
145 return filters_.size();
146 }
147
144 // static 148 // static
145 bool URLBlacklist::HasStandardScheme(const GURL& url) { 149 bool URLBlacklist::HasStandardScheme(const GURL& url) {
146 return IsStandardScheme(url.scheme()); 150 return IsStandardScheme(url.scheme());
147 } 151 }
148 152
149 // static 153 // static
150 bool URLBlacklist::FilterToComponents(const std::string& filter, 154 bool URLBlacklist::FilterToComponents(const std::string& filter,
151 std::string* scheme, 155 std::string* scheme,
152 std::string* host, 156 std::string* host,
153 bool* match_subdomains, 157 bool* match_subdomains,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 360
357 // static 361 // static
358 void URLBlacklistManager::RegisterUserPrefs(PrefServiceSyncable* pref_service) { 362 void URLBlacklistManager::RegisterUserPrefs(PrefServiceSyncable* pref_service) {
359 pref_service->RegisterListPref(prefs::kUrlBlacklist, 363 pref_service->RegisterListPref(prefs::kUrlBlacklist,
360 PrefServiceSyncable::UNSYNCABLE_PREF); 364 PrefServiceSyncable::UNSYNCABLE_PREF);
361 pref_service->RegisterListPref(prefs::kUrlWhitelist, 365 pref_service->RegisterListPref(prefs::kUrlWhitelist,
362 PrefServiceSyncable::UNSYNCABLE_PREF); 366 PrefServiceSyncable::UNSYNCABLE_PREF);
363 } 367 }
364 368
365 } // namespace policy 369 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/url_blacklist_manager.h ('k') | chrome/browser/profiles/profile_info_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698