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

Side by Side Diff: chrome/browser/chromeos/preferences.cc

Issue 171013003: Valgrind: Fix uninit condition in chromeos::Preferences::ApplyPreferences. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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/chromeos/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/autoclick/autoclick_controller.h" 9 #include "ash/autoclick/autoclick_controller.h"
10 #include "ash/magnifier/magnifier_constants.h" 10 #include "ash/magnifier/magnifier_constants.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 user_is_primary_(false) { 53 user_is_primary_(false) {
54 // Do not observe shell, if there is no shell instance; e.g., in some unit 54 // Do not observe shell, if there is no shell instance; e.g., in some unit
55 // tests. 55 // tests.
56 if (ash::Shell::HasInstance()) 56 if (ash::Shell::HasInstance())
57 ash::Shell::GetInstance()->AddShellObserver(this); 57 ash::Shell::GetInstance()->AddShellObserver(this);
58 } 58 }
59 59
60 Preferences::Preferences(input_method::InputMethodManager* input_method_manager) 60 Preferences::Preferences(input_method::InputMethodManager* input_method_manager)
61 : prefs_(NULL), 61 : prefs_(NULL),
62 input_method_manager_(input_method_manager), 62 input_method_manager_(input_method_manager),
63 user_(NULL) { 63 user_(NULL),
64 user_is_primary_(false) {
64 // Do not observe shell, if there is no shell instance; e.g., in some unit 65 // Do not observe shell, if there is no shell instance; e.g., in some unit
65 // tests. 66 // tests.
66 if (ash::Shell::HasInstance()) 67 if (ash::Shell::HasInstance())
67 ash::Shell::GetInstance()->AddShellObserver(this); 68 ash::Shell::GetInstance()->AddShellObserver(this);
68 } 69 }
69 70
70 Preferences::~Preferences() { 71 Preferences::~Preferences() {
71 prefs_->RemoveObserver(this); 72 prefs_->RemoveObserver(this);
72 UserManager::Get()->RemoveSessionStateObserver(this); 73 UserManager::Get()->RemoveSessionStateObserver(this);
73 // If shell instance is destoryed before this preferences instance, there is 74 // If shell instance is destoryed before this preferences instance, there is
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 touch_hud_projection_enabled_.SetValue(enabled); 632 touch_hud_projection_enabled_.SetValue(enabled);
632 } 633 }
633 634
634 void Preferences::ActiveUserChanged(const User* active_user) { 635 void Preferences::ActiveUserChanged(const User* active_user) {
635 if (active_user != user_) 636 if (active_user != user_)
636 return; 637 return;
637 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 638 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
638 } 639 }
639 640
640 } // namespace chromeos 641 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698