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

Side by Side Diff: chrome/browser/chromeos/first_run/first_run_controller.cc

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/first_run/first_run_controller.h" 5 #include "chrome/browser/chromeos/first_run/first_run_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 FirstRunController::FirstRunController() 66 FirstRunController::FirstRunController()
67 : actor_(NULL), 67 : actor_(NULL),
68 current_step_index_(NONE_STEP_INDEX), 68 current_step_index_(NONE_STEP_INDEX),
69 user_profile_(NULL) { 69 user_profile_(NULL) {
70 } 70 }
71 71
72 void FirstRunController::Init() { 72 void FirstRunController::Init() {
73 start_time_ = base::Time::Now(); 73 start_time_ = base::Time::Now();
74 UserManager* user_manager = UserManager::Get(); 74 UserManager* user_manager = UserManager::Get();
75 user_profile_ = 75 user_profile_ = ProfileHelper::Get()->GetProfileByUserUnsafe(
76 ProfileHelper::Get()->GetProfileByUser(user_manager->GetActiveUser()); 76 user_manager->GetActiveUser());
77 77
78 shell_helper_.reset(ash::Shell::GetInstance()->CreateFirstRunHelper()); 78 shell_helper_.reset(ash::Shell::GetInstance()->CreateFirstRunHelper());
79 shell_helper_->AddObserver(this); 79 shell_helper_->AddObserver(this);
80 80
81 FirstRunView* view = new FirstRunView(); 81 FirstRunView* view = new FirstRunView();
82 view->Init(user_profile_); 82 view->Init(user_profile_);
83 shell_helper_->GetOverlayWidget()->SetContentsView(view); 83 shell_helper_->GetOverlayWidget()->SetContentsView(view);
84 actor_ = view->GetActor(); 84 actor_ = view->GetActor();
85 actor_->set_delegate(this); 85 actor_->set_delegate(this);
86 shell_helper_->GetOverlayWidget()->Show(); 86 shell_helper_->GetOverlayWidget()->Show();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 current_step_index_ = NONE_STEP_INDEX; 187 current_step_index_ = NONE_STEP_INDEX;
188 } 188 }
189 189
190 first_run::Step* FirstRunController::GetCurrentStep() const { 190 first_run::Step* FirstRunController::GetCurrentStep() const {
191 return current_step_index_ != NONE_STEP_INDEX ? 191 return current_step_index_ != NONE_STEP_INDEX ?
192 steps_[current_step_index_].get() : NULL; 192 steps_[current_step_index_].get() : NULL;
193 } 193 }
194 194
195 } // namespace chromeos 195 } // namespace chromeos
196 196
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/first_run/first_run.cc ('k') | chrome/browser/chromeos/login/fake_login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698