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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/signin/chrome_signin_manager_delegate.h" 5 #include "chrome/browser/signin/chrome_signin_manager_delegate.h"
6 6
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 9
10 namespace { 10 namespace {
11 11
12 const char kGoogleAccountsUrl[] = "https://accounts.google.com"; 12 const char kGoogleAccountsUrl[] = "https://accounts.google.com";
13 13
14 } // namespace 14 } // namespace
15 15
16 ChromeSigninManagerDelegate::ChromeSigninManagerDelegate(Profile* profile) 16 ChromeSigninManagerDelegate::ChromeSigninManagerDelegate(Profile* profile)
17 : profile_(profile) { 17 : profile_(profile) {
18 } 18 }
19 19
20 ChromeSigninManagerDelegate::~ChromeSigninManagerDelegate() { 20 ChromeSigninManagerDelegate::~ChromeSigninManagerDelegate() {
21 } 21 }
22 22
23 // static 23 // static
24 bool ChromeSigninManagerDelegate::ProfileAllowsSigninCookies(Profile* profile) { 24 bool ChromeSigninManagerDelegate::ProfileAllowsSigninCookies(Profile* profile) {
25 CookieSettings* cookie_settings = 25 CookieSettings* cookie_settings =
26 CookieSettings::Factory::GetForProfile(profile); 26 CookieSettings::Factory::GetForProfile(profile).get();
27 return SettingsAllowSigninCookies(cookie_settings); 27 return SettingsAllowSigninCookies(cookie_settings);
28 } 28 }
29 29
30 // static 30 // static
31 bool ChromeSigninManagerDelegate::SettingsAllowSigninCookies( 31 bool ChromeSigninManagerDelegate::SettingsAllowSigninCookies(
32 CookieSettings* cookie_settings) { 32 CookieSettings* cookie_settings) {
33 return cookie_settings && 33 return cookie_settings &&
34 cookie_settings->IsSettingCookieAllowed(GURL(kGoogleAccountsUrl), 34 cookie_settings->IsSettingCookieAllowed(GURL(kGoogleAccountsUrl),
35 GURL(kGoogleAccountsUrl)); 35 GURL(kGoogleAccountsUrl));
36 } 36 }
37 37
38 38
39 bool ChromeSigninManagerDelegate::AreSigninCookiesAllowed() { 39 bool ChromeSigninManagerDelegate::AreSigninCookiesAllowed() {
40 return ProfileAllowsSigninCookies(profile_); 40 return ProfileAllowsSigninCookies(profile_);
41 } 41 }
OLDNEW
« no previous file with comments | « chrome/browser/service/service_process_control.cc ('k') | chrome/browser/speech/extension_api/tts_engine_extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698