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

Side by Side Diff: trunk/src/chrome/browser/lifetime/application_lifetime.cc

Issue 122053002: Revert 242671 "Implement sampling profiler (chromium side change)" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/lifetime/application_lifetime.h" 5 #include "chrome/browser/lifetime/application_lifetime.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 #endif 181 #endif
182 } 182 }
183 183
184 void StartShutdownTracing() { 184 void StartShutdownTracing() {
185 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 185 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
186 if (command_line.HasSwitch(switches::kTraceShutdown)) { 186 if (command_line.HasSwitch(switches::kTraceShutdown)) {
187 base::debug::CategoryFilter category_filter( 187 base::debug::CategoryFilter category_filter(
188 command_line.GetSwitchValueASCII(switches::kTraceShutdown)); 188 command_line.GetSwitchValueASCII(switches::kTraceShutdown));
189 base::debug::TraceLog::GetInstance()->SetEnabled( 189 base::debug::TraceLog::GetInstance()->SetEnabled(
190 category_filter, 190 category_filter,
191 base::debug::TraceLog::RECORDING_MODE,
192 base::debug::TraceLog::RECORD_UNTIL_FULL); 191 base::debug::TraceLog::RECORD_UNTIL_FULL);
193 } 192 }
194 TRACE_EVENT0("shutdown", "StartShutdownTracing"); 193 TRACE_EVENT0("shutdown", "StartShutdownTracing");
195 } 194 }
196 195
197 // The Android implementation is in application_lifetime_android.cc 196 // The Android implementation is in application_lifetime_android.cc
198 #if !defined(OS_ANDROID) 197 #if !defined(OS_ANDROID)
199 void AttemptRestart() { 198 void AttemptRestart() {
200 // TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead? 199 // TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead?
201 for (chrome::BrowserIterator it; !it.done(); it.Next()) 200 for (chrome::BrowserIterator it; !it.done(); it.Next())
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 // environment is still active. 395 // environment is still active.
397 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE) 396 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE)
398 return !ash::Shell::HasInstance(); 397 return !ash::Shell::HasInstance();
399 else if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) 398 else if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
400 return BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE)->empty(); 399 return BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE)->empty();
401 #endif 400 #endif
402 return true; 401 return true;
403 } 402 }
404 403
405 } // namespace chrome 404 } // namespace chrome
OLDNEW
« no previous file with comments | « trunk/src/base/test/trace_event_analyzer_unittest.cc ('k') | trunk/src/components/tracing/child_trace_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698