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

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

Issue 110643005: Refactored the URLBlacklistManager to avoid chrome/ and content/ dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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
« no previous file with comments | « chrome/browser/policy/policy_helpers.h ('k') | chrome/browser/policy/url_blacklist_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/policy_helpers.h"
6
7 #include "url/gurl.h"
8
9 #if !defined(OS_CHROMEOS)
10 #include "chrome/browser/signin/signin_manager.h"
11 #include "google_apis/gaia/gaia_urls.h"
12 #endif
13
14 namespace policy {
15
16 bool SkipBlacklistForURL(const GURL& url) {
17 #if defined(OS_CHROMEOS)
18 return false;
19 #else
20 static const char kServiceLoginAuth[] = "/ServiceLoginAuth";
21
22 // Whitelist all the signin flow URLs flagged by the SigninManager.
23 if (SigninManager::IsWebBasedSigninFlowURL(url))
24 return true;
25
26 // Additionally whitelist /ServiceLoginAuth.
27 if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin())
28 return false;
29
30 return url.path() == kServiceLoginAuth;
31 #endif
32 }
33
34 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_helpers.h ('k') | chrome/browser/policy/url_blacklist_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698