OLD | NEW |
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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 #endif | 345 #endif |
346 } | 346 } |
347 private: | 347 private: |
348 DISALLOW_COPY_AND_ASSIGN(MemoryObserver); | 348 DISALLOW_COPY_AND_ASSIGN(MemoryObserver); |
349 }; | 349 }; |
350 | 350 |
351 | 351 |
352 // BrowserMainLoop construction / destruction ============================= | 352 // BrowserMainLoop construction / destruction ============================= |
353 | 353 |
354 BrowserMainLoop* BrowserMainLoop::GetInstance() { | 354 BrowserMainLoop* BrowserMainLoop::GetInstance() { |
355 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 355 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
356 return g_current_browser_main_loop; | 356 return g_current_browser_main_loop; |
357 } | 357 } |
358 | 358 |
359 BrowserMainLoop::BrowserMainLoop(const MainFunctionParams& parameters) | 359 BrowserMainLoop::BrowserMainLoop(const MainFunctionParams& parameters) |
360 : parameters_(parameters), | 360 : parameters_(parameters), |
361 parsed_command_line_(parameters.command_line), | 361 parsed_command_line_(parameters.command_line), |
362 result_code_(RESULT_CODE_NORMAL_EXIT), | 362 result_code_(RESULT_CODE_NORMAL_EXIT), |
363 created_threads_(false), | 363 created_threads_(false), |
364 // ContentMainRunner should have enabled tracing of the browser process | 364 // ContentMainRunner should have enabled tracing of the browser process |
365 // when kTraceStartup is in the command line. | 365 // when kTraceStartup is in the command line. |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 | 1270 |
1271 void BrowserMainLoop::EndStartupTracing() { | 1271 void BrowserMainLoop::EndStartupTracing() { |
1272 is_tracing_startup_ = false; | 1272 is_tracing_startup_ = false; |
1273 TracingController::GetInstance()->DisableRecording( | 1273 TracingController::GetInstance()->DisableRecording( |
1274 TracingController::CreateFileSink( | 1274 TracingController::CreateFileSink( |
1275 startup_trace_file_, | 1275 startup_trace_file_, |
1276 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1276 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1277 } | 1277 } |
1278 | 1278 |
1279 } // namespace content | 1279 } // namespace content |
OLD | NEW |