| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/metrics/histogram.h" | 6 #include "base/metrics/histogram.h" |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/chromeos/first_run/first_run_controller.h" | 10 #include "chrome/browser/chromeos/first_run/first_run_controller.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 DCHECK(profile); | 54 DCHECK(profile); |
| 55 registrar_.Add(this, | 55 registrar_.Add(this, |
| 56 chrome::NOTIFICATION_SESSION_STARTED, | 56 chrome::NOTIFICATION_SESSION_STARTED, |
| 57 content::NotificationService::AllSources()); | 57 content::NotificationService::AllSources()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual ~DialogLauncher() {} | 60 virtual ~DialogLauncher() {} |
| 61 | 61 |
| 62 virtual void Observe(int type, | 62 virtual void Observe(int type, |
| 63 const content::NotificationSource& source, | 63 const content::NotificationSource& source, |
| 64 const content::NotificationDetails& details) OVERRIDE { | 64 const content::NotificationDetails& details) override { |
| 65 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED); | 65 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED); |
| 66 DCHECK(content::Details<const user_manager::User>(details).ptr() == | 66 DCHECK(content::Details<const user_manager::User>(details).ptr() == |
| 67 ProfileHelper::Get()->GetUserByProfile(profile_)); | 67 ProfileHelper::Get()->GetUserByProfile(profile_)); |
| 68 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 68 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 69 bool launched_in_test = command_line->HasSwitch(::switches::kTestType); | 69 bool launched_in_test = command_line->HasSwitch(::switches::kTestType); |
| 70 bool launched_in_telemetry = | 70 bool launched_in_telemetry = |
| 71 command_line->HasSwitch(switches::kOobeSkipPostLogin); | 71 command_line->HasSwitch(switches::kOobeSkipPostLogin); |
| 72 bool is_user_new = user_manager::UserManager::Get()->IsCurrentUserNew(); | 72 bool is_user_new = user_manager::UserManager::Get()->IsCurrentUserNew(); |
| 73 bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI); | 73 bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI); |
| 74 bool first_run_seen = | 74 bool first_run_seen = |
| (...skipping 27 matching lines...) Expand all Loading... |
| 102 user_manager::UserManager::Get()->GetActiveUser())); | 102 user_manager::UserManager::Get()->GetActiveUser())); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void LaunchTutorial() { | 105 void LaunchTutorial() { |
| 106 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); | 106 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); |
| 107 FirstRunController::Start(); | 107 FirstRunController::Start(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace first_run | 110 } // namespace first_run |
| 111 } // namespace chromeos | 111 } // namespace chromeos |
| OLD | NEW |