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/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 profile->GetProxyConfigTracker())); | 412 profile->GetProxyConfigTracker())); |
413 #if defined(ENABLE_SUPERVISED_USERS) | 413 #if defined(ENABLE_SUPERVISED_USERS) |
414 SupervisedUserService* supervised_user_service = | 414 SupervisedUserService* supervised_user_service = |
415 SupervisedUserServiceFactory::GetForProfile(profile); | 415 SupervisedUserServiceFactory::GetForProfile(profile); |
416 params->supervised_user_url_filter = | 416 params->supervised_user_url_filter = |
417 supervised_user_service->GetURLFilterForIOThread(); | 417 supervised_user_service->GetURLFilterForIOThread(); |
418 #endif | 418 #endif |
419 #if defined(OS_CHROMEOS) | 419 #if defined(OS_CHROMEOS) |
420 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 420 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
421 if (user_manager) { | 421 if (user_manager) { |
422 user_manager::User* user = | 422 const user_manager::User* user = |
423 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 423 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
424 // No need to initialize NSS for users with empty username hash: | 424 // No need to initialize NSS for users with empty username hash: |
425 // Getters for a user's NSS slots always return NULL slot if the user's | 425 // Getters for a user's NSS slots always return NULL slot if the user's |
426 // username hash is empty, even when the NSS is not initialized for the | 426 // username hash is empty, even when the NSS is not initialized for the |
427 // user. | 427 // user. |
428 if (user && !user->username_hash().empty()) { | 428 if (user && !user->username_hash().empty()) { |
429 params->username_hash = user->username_hash(); | 429 params->username_hash = user->username_hash(); |
430 DCHECK(!params->username_hash.empty()); | 430 DCHECK(!params->username_hash.empty()); |
431 BrowserThread::PostTask(BrowserThread::IO, | 431 BrowserThread::PostTask(BrowserThread::IO, |
432 FROM_HERE, | 432 FROM_HERE, |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 void ProfileIOData::SetCookieSettingsForTesting( | 1346 void ProfileIOData::SetCookieSettingsForTesting( |
1347 CookieSettings* cookie_settings) { | 1347 CookieSettings* cookie_settings) { |
1348 DCHECK(!cookie_settings_.get()); | 1348 DCHECK(!cookie_settings_.get()); |
1349 cookie_settings_ = cookie_settings; | 1349 cookie_settings_ = cookie_settings; |
1350 } | 1350 } |
1351 | 1351 |
1352 void ProfileIOData::set_signin_names_for_testing( | 1352 void ProfileIOData::set_signin_names_for_testing( |
1353 SigninNamesOnIOThread* signin_names) { | 1353 SigninNamesOnIOThread* signin_names) { |
1354 signin_names_.reset(signin_names); | 1354 signin_names_.reset(signin_names); |
1355 } | 1355 } |
OLD | NEW |