Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 | 100 |
| 101 // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs. | 101 // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs. |
| 102 const char kGuestModeLoggingLevel[] = "1"; | 102 const char kGuestModeLoggingLevel[] = "1"; |
| 103 | 103 |
| 104 // Format of command line switch. | 104 // Format of command line switch. |
| 105 const char kSwitchFormatString[] = " --%s=\"%s\""; | 105 const char kSwitchFormatString[] = " --%s=\"%s\""; |
| 106 | 106 |
| 107 // User name which is used in the Guest session. | 107 // User name which is used in the Guest session. |
| 108 const char kGuestUserName[] = ""; | 108 const char kGuestUserName[] = ""; |
| 109 | 109 |
| 110 // TODO(zelidrag): Figure out if we need to add more services here. | |
| 111 const char kServiceScopeChromeOSDocuments[] = | |
| 112 "https://docs.google.com/feeds/ " | |
| 113 "https://spreadsheets.google.com/feeds/ " | |
| 114 "https://docs.googleusercontent.com/"; | |
|
satorux1
2012/07/09 15:58:11
could you create a separate patch to remove this?
kochi
2012/07/10 09:01:14
https://chromiumcodereview.appspot.com/10752021/
| |
| 115 | |
| 116 class InitializeCookieMonsterHelper { | 110 class InitializeCookieMonsterHelper { |
| 117 public: | 111 public: |
| 118 explicit InitializeCookieMonsterHelper( | 112 explicit InitializeCookieMonsterHelper( |
| 119 net::URLRequestContextGetter* new_context) | 113 net::URLRequestContextGetter* new_context) |
| 120 : ALLOW_THIS_IN_INITIALIZER_LIST(callback_(base::Bind( | 114 : ALLOW_THIS_IN_INITIALIZER_LIST(callback_(base::Bind( |
| 121 &InitializeCookieMonsterHelper::InitializeCookieMonster, | 115 &InitializeCookieMonsterHelper::InitializeCookieMonster, |
| 122 base::Unretained(this)))), | 116 base::Unretained(this)))), |
| 123 new_context_(new_context) { | 117 new_context_(new_context) { |
| 124 } | 118 } |
| 125 | 119 |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1121 bool LoginUtils::IsWhitelisted(const std::string& username) { | 1115 bool LoginUtils::IsWhitelisted(const std::string& username) { |
| 1122 CrosSettings* cros_settings = CrosSettings::Get(); | 1116 CrosSettings* cros_settings = CrosSettings::Get(); |
| 1123 bool allow_new_user = false; | 1117 bool allow_new_user = false; |
| 1124 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); | 1118 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); |
| 1125 if (allow_new_user) | 1119 if (allow_new_user) |
| 1126 return true; | 1120 return true; |
| 1127 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); | 1121 return cros_settings->FindEmailInList(kAccountsPrefUsers, username); |
| 1128 } | 1122 } |
| 1129 | 1123 |
| 1130 } // namespace chromeos | 1124 } // namespace chromeos |
| OLD | NEW |