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

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

Issue 549453005: Run athena on device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 22 matching lines...) Expand all
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 namespace chromeos { 37 namespace chromeos {
38 38
39 FirstRunController::~FirstRunController() {} 39 FirstRunController::~FirstRunController() {}
40 40
41 // static 41 // static
42 void FirstRunController::Start() { 42 void FirstRunController::Start() {
43 #if !defined(USE_ATHENA)
44 // crbug.com/413914
43 if (g_instance) { 45 if (g_instance) {
44 LOG(WARNING) << "First-run tutorial is running already."; 46 LOG(WARNING) << "First-run tutorial is running already.";
45 return; 47 return;
46 } 48 }
47 g_instance = new FirstRunController(); 49 g_instance = new FirstRunController();
48 g_instance->Init(); 50 g_instance->Init();
51 #endif
49 } 52 }
50 53
51 // static 54 // static
52 void FirstRunController::Stop() { 55 void FirstRunController::Stop() {
56 #if !defined(USE_ATHENA)
53 if (!g_instance) { 57 if (!g_instance) {
54 LOG(WARNING) << "First-run tutorial is not running."; 58 LOG(WARNING) << "First-run tutorial is not running.";
55 return; 59 return;
56 } 60 }
57 g_instance->Finalize(); 61 g_instance->Finalize();
58 base::MessageLoop::current()->DeleteSoon(FROM_HERE, g_instance); 62 base::MessageLoop::current()->DeleteSoon(FROM_HERE, g_instance);
59 g_instance = NULL; 63 g_instance = NULL;
64 #endif
60 } 65 }
61 66
62 FirstRunController* FirstRunController::GetInstanceForTest() { 67 FirstRunController* FirstRunController::GetInstanceForTest() {
63 return g_instance; 68 return g_instance;
64 } 69 }
65 70
66 FirstRunController::FirstRunController() 71 FirstRunController::FirstRunController()
67 : actor_(NULL), 72 : actor_(NULL),
68 current_step_index_(NONE_STEP_INDEX), 73 current_step_index_(NONE_STEP_INDEX),
69 user_profile_(NULL) { 74 user_profile_(NULL) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 current_step_index_ = NONE_STEP_INDEX; 192 current_step_index_ = NONE_STEP_INDEX;
188 } 193 }
189 194
190 first_run::Step* FirstRunController::GetCurrentStep() const { 195 first_run::Step* FirstRunController::GetCurrentStep() const {
191 return current_step_index_ != NONE_STEP_INDEX ? 196 return current_step_index_ != NONE_STEP_INDEX ?
192 steps_[current_step_index_].get() : NULL; 197 steps_[current_step_index_].get() : NULL;
193 } 198 }
194 199
195 } // namespace chromeos 200 } // namespace chromeos
196 201
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/cros_dbus_service.cc ('k') | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698