OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_init.h" | 5 #include "chrome/browser/browser_init.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/event_recorder.h" | 9 #include "base/event_recorder.h" |
10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // TODO(cpu): Port to other platforms. | 172 // TODO(cpu): Port to other platforms. |
173 LaunchMode GetLaunchSortcutKind() { | 173 LaunchMode GetLaunchSortcutKind() { |
174 return LM_LINUX_MAC_BEOS; | 174 return LM_LINUX_MAC_BEOS; |
175 } | 175 } |
176 #endif | 176 #endif |
177 | 177 |
178 // Log in a histogram the frequency of launching by the different methods. See | 178 // Log in a histogram the frequency of launching by the different methods. See |
179 // LaunchMode enum for the actual values of the buckets. | 179 // LaunchMode enum for the actual values of the buckets. |
180 void RecordLaunchModeHistogram(LaunchMode mode) { | 180 void RecordLaunchModeHistogram(LaunchMode mode) { |
181 int bucket = (mode == LM_TO_BE_DECIDED) ? GetLaunchSortcutKind() : mode; | 181 int bucket = (mode == LM_TO_BE_DECIDED) ? GetLaunchSortcutKind() : mode; |
182 UMA_HISTOGRAM_COUNTS_100(L"Launch.Modes", bucket); | 182 UMA_HISTOGRAM_COUNTS_100("Launch.Modes", bucket); |
183 } | 183 } |
184 | 184 |
185 } // namespace | 185 } // namespace |
186 | 186 |
187 static bool in_startup = false; | 187 static bool in_startup = false; |
188 | 188 |
189 // static | 189 // static |
190 bool BrowserInit::InProcessStartup() { | 190 bool BrowserInit::InProcessStartup() { |
191 return in_startup; | 191 return in_startup; |
192 } | 192 } |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 bool launched = lwp.Launch(profile, process_startup); | 555 bool launched = lwp.Launch(profile, process_startup); |
556 if (!launched) { | 556 if (!launched) { |
557 LOG(ERROR) << "launch error"; | 557 LOG(ERROR) << "launch error"; |
558 if (return_code != NULL) | 558 if (return_code != NULL) |
559 *return_code = ResultCodes::INVALID_CMDLINE_URL; | 559 *return_code = ResultCodes::INVALID_CMDLINE_URL; |
560 return false; | 560 return false; |
561 } | 561 } |
562 | 562 |
563 return true; | 563 return true; |
564 } | 564 } |
OLD | NEW |