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/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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 params->supervised_user_url_filter = | 355 params->supervised_user_url_filter = |
| 356 supervised_user_service->GetURLFilterForIOThread(); | 356 supervised_user_service->GetURLFilterForIOThread(); |
| 357 #endif | 357 #endif |
| 358 #if defined(OS_CHROMEOS) | 358 #if defined(OS_CHROMEOS) |
| 359 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 359 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
| 360 if (user_manager) { | 360 if (user_manager) { |
| 361 chromeos::User* user = | 361 chromeos::User* user = |
| 362 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 362 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
| 363 if (user) { | 363 if (user) { |
| 364 params->username_hash = user->username_hash(); | 364 params->username_hash = user->username_hash(); |
| 365 if (params->username_hash.empty()) | |
| 366 LOG(ERROR) << "No username_hash for: " << user->email(); | |
|
mattm
2014/07/11 20:39:54
Maybe just change to a DCHECK or remove?
stevenjb
2014/07/14 17:13:14
Changed to a DCHECK.
| |
| 365 bool is_primary_user = (user_manager->GetPrimaryUser() == user); | 367 bool is_primary_user = (user_manager->GetPrimaryUser() == user); |
| 366 BrowserThread::PostTask(BrowserThread::IO, | 368 BrowserThread::PostTask(BrowserThread::IO, |
| 367 FROM_HERE, | 369 FROM_HERE, |
| 368 base::Bind(&StartNSSInitOnIOThread, | 370 base::Bind(&StartNSSInitOnIOThread, |
| 369 user->email(), | 371 user->email(), |
| 370 user->username_hash(), | 372 user->username_hash(), |
| 371 profile->GetPath(), | 373 profile->GetPath(), |
| 372 is_primary_user)); | 374 is_primary_user)); |
| 373 } | 375 } |
| 374 } | 376 } |
| 375 if (params->username_hash.empty()) | |
| 376 LOG(WARNING) << "no username_hash"; | |
| 377 #endif | 377 #endif |
| 378 | 378 |
| 379 params->profile = profile; | 379 params->profile = profile; |
| 380 params->prerender_tracker = g_browser_process->prerender_tracker(); | 380 params->prerender_tracker = g_browser_process->prerender_tracker(); |
| 381 profile_params_.reset(params.release()); | 381 profile_params_.reset(params.release()); |
| 382 | 382 |
| 383 ChromeNetworkDelegate::InitializePrefsOnUIThread( | 383 ChromeNetworkDelegate::InitializePrefsOnUIThread( |
| 384 &enable_referrers_, | 384 &enable_referrers_, |
| 385 &enable_do_not_track_, | 385 &enable_do_not_track_, |
| 386 &force_safesearch_, | 386 &force_safesearch_, |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1248 void ProfileIOData::SetCookieSettingsForTesting( | 1248 void ProfileIOData::SetCookieSettingsForTesting( |
| 1249 CookieSettings* cookie_settings) { | 1249 CookieSettings* cookie_settings) { |
| 1250 DCHECK(!cookie_settings_.get()); | 1250 DCHECK(!cookie_settings_.get()); |
| 1251 cookie_settings_ = cookie_settings; | 1251 cookie_settings_ = cookie_settings; |
| 1252 } | 1252 } |
| 1253 | 1253 |
| 1254 void ProfileIOData::set_signin_names_for_testing( | 1254 void ProfileIOData::set_signin_names_for_testing( |
| 1255 SigninNamesOnIOThread* signin_names) { | 1255 SigninNamesOnIOThread* signin_names) { |
| 1256 signin_names_.reset(signin_names); | 1256 signin_names_.reset(signin_names); |
| 1257 } | 1257 } |
| OLD | NEW |