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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 141683005: Removes MessageLoop::Type checks in favor of IsCurrent on MessageLoops. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base:: 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 "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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 1063
1064 if (parts_) 1064 if (parts_)
1065 parts_->ToolkitInitialized(); 1065 parts_->ToolkitInitialized();
1066 } 1066 }
1067 1067
1068 void BrowserMainLoop::MainMessageLoopRun() { 1068 void BrowserMainLoop::MainMessageLoopRun() {
1069 #if defined(OS_ANDROID) 1069 #if defined(OS_ANDROID)
1070 // Android's main message loop is the Java message loop. 1070 // Android's main message loop is the Java message loop.
1071 NOTREACHED(); 1071 NOTREACHED();
1072 #else 1072 #else
1073 DCHECK_EQ(base::MessageLoop::TYPE_UI, base::MessageLoop::current()->type()); 1073 DCHECK(base::MessageLoopForUI::IsCurrent());
1074 if (parameters_.ui_task) 1074 if (parameters_.ui_task)
1075 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 1075 base::MessageLoopForUI::current()->PostTask(FROM_HERE,
1076 *parameters_.ui_task); 1076 *parameters_.ui_task);
1077 1077
1078 base::RunLoop run_loop; 1078 base::RunLoop run_loop;
1079 run_loop.Run(); 1079 run_loop.Run();
1080 #endif 1080 #endif
1081 } 1081 }
1082 1082
1083 void BrowserMainLoop::InitStartupTracing(const CommandLine& command_line) { 1083 void BrowserMainLoop::InitStartupTracing(const CommandLine& command_line) {
(...skipping 28 matching lines...) Expand all
1112 base::TimeDelta::FromSeconds(delay_secs)); 1112 base::TimeDelta::FromSeconds(delay_secs));
1113 } 1113 }
1114 1114
1115 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) { 1115 void BrowserMainLoop::EndStartupTracing(const base::FilePath& trace_file) {
1116 is_tracing_startup_ = false; 1116 is_tracing_startup_ = false;
1117 TracingController::GetInstance()->DisableRecording( 1117 TracingController::GetInstance()->DisableRecording(
1118 trace_file, TracingController::TracingFileResultCallback()); 1118 trace_file, TracingController::TracingFileResultCallback());
1119 } 1119 }
1120 1120
1121 } // namespace content 1121 } // namespace content
OLDNEW
« no previous file with comments | « cloud_print/service/win/cloud_print_service_config.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698