Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 148983006: Fix a crash due to uninitialized preference member in ProfileIOData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a comment typo Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/prefetch/prefetch_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 one_click_signin_rejected_email_list_.Init( 405 one_click_signin_rejected_email_list_.Init(
406 prefs::kReverseAutologinRejectedEmailList, pref_service); 406 prefs::kReverseAutologinRejectedEmailList, pref_service);
407 one_click_signin_rejected_email_list_.MoveToThread(io_message_loop_proxy); 407 one_click_signin_rejected_email_list_.MoveToThread(io_message_loop_proxy);
408 408
409 sync_disabled_.Init(prefs::kSyncManaged, pref_service); 409 sync_disabled_.Init(prefs::kSyncManaged, pref_service);
410 sync_disabled_.MoveToThread(io_message_loop_proxy); 410 sync_disabled_.MoveToThread(io_message_loop_proxy);
411 411
412 signin_allowed_.Init(prefs::kSigninAllowed, pref_service); 412 signin_allowed_.Init(prefs::kSigninAllowed, pref_service);
413 signin_allowed_.MoveToThread(io_message_loop_proxy); 413 signin_allowed_.MoveToThread(io_message_loop_proxy);
414
415 network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled,
416 pref_service);
417 network_prediction_enabled_.MoveToThread(io_message_loop_proxy);
418 } 414 }
419 415
420 quick_check_enabled_.Init(prefs::kQuickCheckEnabled, 416 quick_check_enabled_.Init(prefs::kQuickCheckEnabled,
421 local_state_pref_service); 417 local_state_pref_service);
422 quick_check_enabled_.MoveToThread(io_message_loop_proxy); 418 quick_check_enabled_.MoveToThread(io_message_loop_proxy);
423 419
424 media_device_id_salt_.reset(new MediaDeviceIDSalt(pref_service, 420 media_device_id_salt_.reset(new MediaDeviceIDSalt(pref_service,
425 is_incognito())); 421 is_incognito()));
426 422
423 network_prediction_enabled_.Init(prefs::kNetworkPredictionEnabled,
424 pref_service);
425 network_prediction_enabled_.MoveToThread(io_message_loop_proxy);
426
427 #if defined(OS_CHROMEOS) 427 #if defined(OS_CHROMEOS)
428 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); 428 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile);
429 #endif 429 #endif
430 // The URLBlacklistManager has to be created on the UI thread to register 430 // The URLBlacklistManager has to be created on the UI thread to register
431 // observers of |pref_service|, and it also has to clean up on 431 // observers of |pref_service|, and it also has to clean up on
432 // ShutdownOnUIThread to release these observers on the right thread. 432 // ShutdownOnUIThread to release these observers on the right thread.
433 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, 433 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up,
434 // in particular when this ProfileIOData isn't |initialized_| during deletion. 434 // in particular when this ProfileIOData isn't |initialized_| during deletion.
435 #if defined(ENABLE_CONFIGURATION_POLICY) 435 #if defined(ENABLE_CONFIGURATION_POLICY)
436 policy::URLBlacklist::SegmentURLCallback callback = 436 policy::URLBlacklist::SegmentURLCallback callback =
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 void ProfileIOData::SetCookieSettingsForTesting( 1131 void ProfileIOData::SetCookieSettingsForTesting(
1132 CookieSettings* cookie_settings) { 1132 CookieSettings* cookie_settings) {
1133 DCHECK(!cookie_settings_.get()); 1133 DCHECK(!cookie_settings_.get());
1134 cookie_settings_ = cookie_settings; 1134 cookie_settings_ = cookie_settings;
1135 } 1135 }
1136 1136
1137 void ProfileIOData::set_signin_names_for_testing( 1137 void ProfileIOData::set_signin_names_for_testing(
1138 SigninNamesOnIOThread* signin_names) { 1138 SigninNamesOnIOThread* signin_names) {
1139 signin_names_.reset(signin_names); 1139 signin_names_.reset(signin_names);
1140 } 1140 }
OLDNEW
« no previous file with comments | « chrome/browser/prefetch/prefetch_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698