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

Side by Side Diff: chrome/browser/chromeos/login/screens/error_screen.cc

Issue 424613003: Add debug code to help understand SEGV in ~ErrorScreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix volatile qualifier. Created 6 years, 4 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/chromeos/login/screens/error_screen.h ('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/chromeos/login/screens/error_screen.h" 5 #include "chrome/browser/chromeos/login/screens/error_screen.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/chromeos/login/chrome_restart_request.h" 8 #include "chrome/browser/chromeos/login/chrome_restart_request.h"
9 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" 9 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h"
10 #include "chrome/browser/chromeos/login/startup_utils.h" 10 #include "chrome/browser/chromeos/login/startup_utils.h"
11 #include "chrome/browser/chromeos/login/wizard_controller.h" 11 #include "chrome/browser/chromeos/login/wizard_controller.h"
12 #include "chrome/browser/chromeos/settings/cros_settings.h" 12 #include "chrome/browser/chromeos/settings/cros_settings.h"
13 13
14 namespace {
15 void* const kCanaryConstant = (void*)0xbaddecafbaddecafLLU;
16 }
17
14 namespace chromeos { 18 namespace chromeos {
15 19
16 ErrorScreen::ErrorScreen(ScreenObserver* screen_observer, 20 ErrorScreen::ErrorScreen(ScreenObserver* screen_observer,
17 ErrorScreenActor* actor) 21 ErrorScreenActor* actor)
18 : WizardScreen(screen_observer), 22 : WizardScreen(screen_observer),
23 canary_1_(kCanaryConstant),
19 actor_(actor), 24 actor_(actor),
25 canary_2_(kCanaryConstant),
20 parent_screen_(OobeDisplay::SCREEN_UNKNOWN), 26 parent_screen_(OobeDisplay::SCREEN_UNKNOWN),
21 weak_factory_(this) { 27 weak_factory_(this) {
22 DCHECK(actor_); 28 CHECK(actor_);
23 actor_->SetDelegate(this); 29 actor_->SetDelegate(this);
24 } 30 }
25 31
26 ErrorScreen::~ErrorScreen() { 32 ErrorScreen::~ErrorScreen() {
27 if (actor_) 33 CHECK(this);
28 actor_->SetDelegate(NULL); 34 CHECK(canary_1_ == kCanaryConstant);
35 CHECK(canary_2_ == kCanaryConstant);
36 CHECK(actor_);
37 actor_->SetDelegate(NULL);
29 } 38 }
30 39
31 void ErrorScreen::PrepareToShow() { 40 void ErrorScreen::PrepareToShow() {
32 } 41 }
33 42
34 void ErrorScreen::Show() { 43 void ErrorScreen::Show() {
35 DCHECK(actor_); 44 DCHECK(actor_);
36 actor_->Show(parent_screen(), NULL); 45 actor_->Show(parent_screen(), NULL);
37 } 46 }
38 47
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 175 }
167 176
168 if (guest_login_performer_) 177 if (guest_login_performer_)
169 return; 178 return;
170 179
171 guest_login_performer_.reset(new LoginPerformer(this)); 180 guest_login_performer_.reset(new LoginPerformer(this));
172 guest_login_performer_->LoginOffTheRecord(); 181 guest_login_performer_->LoginOffTheRecord();
173 } 182 }
174 183
175 } // namespace chromeos 184 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/error_screen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698