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

Side by Side Diff: chrome/browser/signin/chrome_signin_manager_delegate.cc

Issue 14367029: Introduce SigninManagerDelegate and use to eliminate CookieSettings dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 years, 7 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
(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/signin/chrome_signin_manager_delegate.h"
6
7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "googleurl/src/gurl.h"
9
10 namespace {
11
12 const char kGoogleAccountsUrl[] = "https://accounts.google.com";
13
14 } // namespace
15
16 ChromeSigninManagerDelegate::ChromeSigninManagerDelegate(Profile* profile)
17 : profile_(profile) {
18 }
19
20 ChromeSigninManagerDelegate::~ChromeSigninManagerDelegate() {
21 }
22
23 // static
24 bool ChromeSigninManagerDelegate::ProfileAllowsSigninCookies(Profile* profile) {
25 CookieSettings* cookie_settings =
26 CookieSettings::Factory::GetForProfile(profile);
27 return SettingsAllowSigninCookies(cookie_settings);
28 }
29
30 // static
31 bool ChromeSigninManagerDelegate::SettingsAllowSigninCookies(
32 CookieSettings* cookie_settings) {
33 return cookie_settings &&
34 cookie_settings->IsSettingCookieAllowed(GURL(kGoogleAccountsUrl),
35 GURL(kGoogleAccountsUrl));
36 }
37
38
39 bool ChromeSigninManagerDelegate::AreSigninCookiesAllowed() {
40 return ProfileAllowsSigninCookies(profile_);
41 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_manager_delegate.h ('k') | chrome/browser/signin/fake_signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698