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

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

Issue 29263007: linux and chromeos: Turn on -Wunused-const-variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 7 years, 2 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 (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/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 26 matching lines...) Expand all
37 using extensions::URLMatcherPortFilter; 37 using extensions::URLMatcherPortFilter;
38 using extensions::URLMatcherSchemeFilter; 38 using extensions::URLMatcherSchemeFilter;
39 39
40 namespace policy { 40 namespace policy {
41 41
42 namespace { 42 namespace {
43 43
44 // Maximum filters per policy. Filters over this index are ignored. 44 // Maximum filters per policy. Filters over this index are ignored.
45 const size_t kMaxFiltersPerPolicy = 1000; 45 const size_t kMaxFiltersPerPolicy = 1000;
46 46
47 #if !defined(OS_CHROMEOS)
48
47 const char kServiceLoginAuth[] = "/ServiceLoginAuth"; 49 const char kServiceLoginAuth[] = "/ServiceLoginAuth";
48 50
49 #if !defined(OS_CHROMEOS)
50
51 bool IsSigninFlowURL(const GURL& url) { 51 bool IsSigninFlowURL(const GURL& url) {
52 // Whitelist all the signin flow URLs flagged by the SigninManager. 52 // Whitelist all the signin flow URLs flagged by the SigninManager.
53 if (SigninManager::IsWebBasedSigninFlowURL(url)) 53 if (SigninManager::IsWebBasedSigninFlowURL(url))
54 return true; 54 return true;
55 55
56 // Additionally whitelist /ServiceLoginAuth. 56 // Additionally whitelist /ServiceLoginAuth.
57 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin()) 57 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin())
58 return false; 58 return false;
59 return url.path() == kServiceLoginAuth; 59 return url.path() == kServiceLoginAuth;
60 } 60 }
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // static 393 // static
394 void URLBlacklistManager::RegisterProfilePrefs( 394 void URLBlacklistManager::RegisterProfilePrefs(
395 user_prefs::PrefRegistrySyncable* registry) { 395 user_prefs::PrefRegistrySyncable* registry) {
396 registry->RegisterListPref(prefs::kUrlBlacklist, 396 registry->RegisterListPref(prefs::kUrlBlacklist,
397 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 397 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
398 registry->RegisterListPref(prefs::kUrlWhitelist, 398 registry->RegisterListPref(prefs::kUrlWhitelist,
399 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 399 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
400 } 400 }
401 401
402 } // namespace policy 402 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/metrics/perf_provider_chromeos.cc ('k') | chrome/browser/storage_monitor/storage_monitor_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698