| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_client.h" | 5 #include "chrome/browser/signin/chrome_signin_client.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/content_settings/cookie_settings.h" | 8 #include "chrome/browser/content_settings/cookie_settings.h" |
| 9 #include "chrome/browser/net/chrome_cookie_notification_details.h" | 9 #include "chrome/browser/net/chrome_cookie_notification_details.h" |
| 10 #include "chrome/browser/signin/local_auth.h" | 10 #include "chrome/browser/signin/local_auth.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 chromeos::UserManager::Get()->IsLoggedInAsLocallyManagedUser()) { | 110 chromeos::UserManager::Get()->IsLoggedInAsLocallyManagedUser()) { |
| 111 // Don't allow revoking credentials for Chrome OS supervised users. | 111 // Don't allow revoking credentials for Chrome OS supervised users. |
| 112 // See http://crbug.com/332032 | 112 // See http://crbug.com/332032 |
| 113 LOG(ERROR) << "Attempt to revoke supervised user refresh " | 113 LOG(ERROR) << "Attempt to revoke supervised user refresh " |
| 114 << "token detected, ignoring."; | 114 << "token detected, ignoring."; |
| 115 return false; | 115 return false; |
| 116 } | 116 } |
| 117 #else | 117 #else |
| 118 // Don't allow revoking credentials for supervised users. | 118 // Don't allow revoking credentials for supervised users. |
| 119 // See http://crbug.com/332032 | 119 // See http://crbug.com/332032 |
| 120 if (profile_->IsManaged()) { | 120 if (profile_->IsSupervised()) { |
| 121 LOG(ERROR) << "Attempt to revoke supervised user refresh " | 121 LOG(ERROR) << "Attempt to revoke supervised user refresh " |
| 122 << "token detected, ignoring."; | 122 << "token detected, ignoring."; |
| 123 return false; | 123 return false; |
| 124 } | 124 } |
| 125 #endif | 125 #endif |
| 126 return true; | 126 return true; |
| 127 } | 127 } |
| 128 | 128 |
| 129 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { | 129 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { |
| 130 return profile_->GetRequestContext(); | 130 return profile_->GetRequestContext(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 void ChromeSigninClient::UnregisterForCookieChangedNotification() { | 194 void ChromeSigninClient::UnregisterForCookieChangedNotification() { |
| 195 // Note that it's allowed to call this method multiple times without an | 195 // Note that it's allowed to call this method multiple times without an |
| 196 // intervening call to |RegisterForCookieChangedNotification()|. | 196 // intervening call to |RegisterForCookieChangedNotification()|. |
| 197 content::Source<Profile> source(profile_); | 197 content::Source<Profile> source(profile_); |
| 198 if (!registrar_.IsRegistered( | 198 if (!registrar_.IsRegistered( |
| 199 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) | 199 this, chrome::NOTIFICATION_COOKIE_CHANGED, source)) |
| 200 return; | 200 return; |
| 201 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); | 201 registrar_.Remove(this, chrome::NOTIFICATION_COOKIE_CHANGED, source); |
| 202 } | 202 } |
| OLD | NEW |