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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 "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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 virtual ~DialogLauncher() {} 63 virtual ~DialogLauncher() {}
64 64
65 virtual void Observe(int type, 65 virtual void Observe(int type,
66 const content::NotificationSource& source, 66 const content::NotificationSource& source,
67 const content::NotificationDetails& details) override { 67 const content::NotificationDetails& details) override {
68 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED); 68 DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED);
69 DCHECK(content::Details<const user_manager::User>(details).ptr() == 69 DCHECK(content::Details<const user_manager::User>(details).ptr() ==
70 ProfileHelper::Get()->GetUserByProfile(profile_)); 70 ProfileHelper::Get()->GetUserByProfile(profile_));
71 CommandLine* command_line = CommandLine::ForCurrentProcess(); 71 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
72 bool launched_in_test = command_line->HasSwitch(::switches::kTestType); 72 bool launched_in_test = command_line->HasSwitch(::switches::kTestType);
73 bool launched_in_telemetry = 73 bool launched_in_telemetry =
74 command_line->HasSwitch(switches::kOobeSkipPostLogin); 74 command_line->HasSwitch(switches::kOobeSkipPostLogin);
75 bool is_user_new = user_manager::UserManager::Get()->IsCurrentUserNew(); 75 bool is_user_new = user_manager::UserManager::Get()->IsCurrentUserNew();
76 bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI); 76 bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI);
77 bool first_run_seen = 77 bool first_run_seen =
78 profile_->GetPrefs()->GetBoolean(prefs::kFirstRunTutorialShown); 78 profile_->GetPrefs()->GetBoolean(prefs::kFirstRunTutorialShown);
79 if (!launched_in_telemetry && 79 if (!launched_in_telemetry &&
80 ((is_user_new && !first_run_seen && !launched_in_test) || 80 ((is_user_new && !first_run_seen && !launched_in_test) ||
81 first_run_forced)) { 81 first_run_forced)) {
(...skipping 23 matching lines...) Expand all
105 user_manager::UserManager::Get()->GetActiveUser())); 105 user_manager::UserManager::Get()->GetActiveUser()));
106 } 106 }
107 107
108 void LaunchTutorial() { 108 void LaunchTutorial() {
109 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true); 109 UMA_HISTOGRAM_BOOLEAN("CrosFirstRun.TutorialLaunched", true);
110 FirstRunController::Start(); 110 FirstRunController::Start();
111 } 111 }
112 112
113 } // namespace first_run 113 } // namespace first_run
114 } // namespace chromeos 114 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698