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

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

Issue 868603007: Mechanical rename of base::debug -> base::trace_event [final pass]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_trace_part3_1
Patch Set: Fixing win file. Created 5 years, 10 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
« no previous file with comments | « base/trace_event/trace_event_win.h ('k') | chrome/test/base/tracing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/logging.h" 10 #include "base/logging.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 PrefService* pref_service = g_browser_process->local_state(); 174 PrefService* pref_service = g_browser_process->local_state();
175 pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, false); 175 pref_service->SetBoolean(prefs::kRestartLastSessionOnShutdown, false);
176 AttemptExitInternal(false); 176 AttemptExitInternal(false);
177 #endif 177 #endif
178 } 178 }
179 179
180 void StartShutdownTracing() { 180 void StartShutdownTracing() {
181 const base::CommandLine& command_line = 181 const base::CommandLine& command_line =
182 *base::CommandLine::ForCurrentProcess(); 182 *base::CommandLine::ForCurrentProcess();
183 if (command_line.HasSwitch(switches::kTraceShutdown)) { 183 if (command_line.HasSwitch(switches::kTraceShutdown)) {
184 base::debug::CategoryFilter category_filter( 184 base::trace_event::CategoryFilter category_filter(
185 command_line.GetSwitchValueASCII(switches::kTraceShutdown)); 185 command_line.GetSwitchValueASCII(switches::kTraceShutdown));
186 base::debug::TraceLog::GetInstance()->SetEnabled( 186 base::trace_event::TraceLog::GetInstance()->SetEnabled(
187 category_filter, 187 category_filter,
188 base::debug::TraceLog::RECORDING_MODE, 188 base::trace_event::TraceLog::RECORDING_MODE,
189 base::debug::TraceOptions()); 189 base::trace_event::TraceOptions());
190 } 190 }
191 TRACE_EVENT0("shutdown", "StartShutdownTracing"); 191 TRACE_EVENT0("shutdown", "StartShutdownTracing");
192 } 192 }
193 193
194 // The Android implementation is in application_lifetime_android.cc 194 // The Android implementation is in application_lifetime_android.cc
195 #if !defined(OS_ANDROID) 195 #if !defined(OS_ANDROID)
196 void AttemptRestart() { 196 void AttemptRestart() {
197 // TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead? 197 // TODO(beng): Can this use ProfileManager::GetLoadedProfiles instead?
198 for (chrome::BrowserIterator it; !it.done(); it.Next()) 198 for (chrome::BrowserIterator it; !it.done(); it.Next())
199 content::BrowserContext::SaveSessionState(it->profile()); 199 content::BrowserContext::SaveSessionState(it->profile());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // environment is still active. 414 // environment is still active.
415 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE) 415 if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_NATIVE)
416 return !ash::Shell::HasInstance(); 416 return !ash::Shell::HasInstance();
417 else if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) 417 else if (browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH)
418 return BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE)->empty(); 418 return BrowserList::GetInstance(chrome::HOST_DESKTOP_TYPE_NATIVE)->empty();
419 #endif 419 #endif
420 return true; 420 return true;
421 } 421 }
422 422
423 } // namespace chrome 423 } // namespace chrome
OLDNEW
« no previous file with comments | « base/trace_event/trace_event_win.h ('k') | chrome/test/base/tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698