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/chromeos/login/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 return; | 235 return; |
236 | 236 |
237 CertLoader::Get()->StartWithNSSDB(database); | 237 CertLoader::Get()->StartWithNSSDB(database); |
238 } | 238 } |
239 | 239 |
240 // Returns new CommandLine with per-user flags. | 240 // Returns new CommandLine with per-user flags. |
241 base::CommandLine CreatePerSessionCommandLine(Profile* profile) { | 241 base::CommandLine CreatePerSessionCommandLine(Profile* profile) { |
242 base::CommandLine user_flags(base::CommandLine::NO_PROGRAM); | 242 base::CommandLine user_flags(base::CommandLine::NO_PROGRAM); |
243 flags_ui::PrefServiceFlagsStorage flags_storage_(profile->GetPrefs()); | 243 flags_ui::PrefServiceFlagsStorage flags_storage_(profile->GetPrefs()); |
244 about_flags::ConvertFlagsToSwitches(&flags_storage_, &user_flags, | 244 about_flags::ConvertFlagsToSwitches(&flags_storage_, &user_flags, |
245 about_flags::kAddSentinels); | 245 flags_ui::kAddSentinels); |
246 return user_flags; | 246 return user_flags; |
247 } | 247 } |
248 | 248 |
249 // Returns true if restart is needed to apply per-session flags. | 249 // Returns true if restart is needed to apply per-session flags. |
250 bool NeedRestartToApplyPerSessionFlags( | 250 bool NeedRestartToApplyPerSessionFlags( |
251 const base::CommandLine& user_flags, | 251 const base::CommandLine& user_flags, |
252 std::set<base::CommandLine::StringType>* out_command_line_difference) { | 252 std::set<base::CommandLine::StringType>* out_command_line_difference) { |
253 // Don't restart browser if it is not first profile in session. | 253 // Don't restart browser if it is not first profile in session. |
254 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() != 1) | 254 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() != 1) |
255 return false; | 255 return false; |
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 first_run::GoodiesDisplayer::Delete(); | 1761 first_run::GoodiesDisplayer::Delete(); |
1762 } | 1762 } |
1763 | 1763 |
1764 void UserSessionManager::CreateTokenUtilIfMissing() { | 1764 void UserSessionManager::CreateTokenUtilIfMissing() { |
1765 if (!token_handle_util_.get()) | 1765 if (!token_handle_util_.get()) |
1766 token_handle_util_.reset( | 1766 token_handle_util_.reset( |
1767 new TokenHandleUtil(user_manager::UserManager::Get())); | 1767 new TokenHandleUtil(user_manager::UserManager::Get())); |
1768 } | 1768 } |
1769 | 1769 |
1770 } // namespace chromeos | 1770 } // namespace chromeos |
OLD | NEW |