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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 8769013: Remove BrowserThread::UnsafeGetBrowserThread, add UnsafeGetMessageLoopForThread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to lkgr (pure merge). Created 9 years 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
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chromeos/boot_times_loader.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 switch (thread_id) { 1419 switch (thread_id) {
1420 case BrowserThread::FILE: 1420 case BrowserThread::FILE:
1421 // Now the command line has been mutated based on about:flags, 1421 // Now the command line has been mutated based on about:flags,
1422 // and the file thread has been started, we can set up metrics 1422 // and the file thread has been started, we can set up metrics
1423 // and initialize field trials. 1423 // and initialize field trials.
1424 metrics_ = SetupMetricsAndFieldTrials(local_state_); 1424 metrics_ = SetupMetricsAndFieldTrials(local_state_);
1425 1425
1426 #if defined(USE_LINUX_BREAKPAD) 1426 #if defined(USE_LINUX_BREAKPAD)
1427 // Needs to be called after we have chrome::DIR_USER_DATA and 1427 // Needs to be called after we have chrome::DIR_USER_DATA and
1428 // g_browser_process. This happens in PreCreateThreads. 1428 // g_browser_process. This happens in PreCreateThreads.
1429 g_browser_process->file_thread()->message_loop()->PostTask( 1429 BrowserThread::PostTask(BrowserThread::FILE,
1430 FROM_HERE, base::Bind(&GetLinuxDistroCallback)); 1430 FROM_HERE,
1431 base::Bind(&GetLinuxDistroCallback));
1431 1432
1432 if (IsCrashReportingEnabled(local_state_)) 1433 if (IsCrashReportingEnabled(local_state_))
1433 InitCrashReporter(); 1434 InitCrashReporter();
1434 #endif 1435 #endif
1435 break; 1436 break;
1436 1437
1437 default: 1438 default:
1438 break; 1439 break;
1439 } 1440 }
1440 } 1441 }
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2156 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2156 (pre_read == "0" || pre_read == "1")) { 2157 (pre_read == "0" || pre_read == "1")) {
2157 std::string uma_name(name); 2158 std::string uma_name(name);
2158 uma_name += "_PreRead"; 2159 uma_name += "_PreRead";
2159 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2160 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2160 AddPreReadHistogramTime(uma_name.c_str(), time); 2161 AddPreReadHistogramTime(uma_name.c_str(), time);
2161 } 2162 }
2162 #endif 2163 #endif
2163 #endif 2164 #endif
2164 } 2165 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/chromeos/boot_times_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698