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

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

Issue 8397001: Open NaCl IRT file only once at startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | chrome/browser/nacl_host/nacl_process_host.h » ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "chrome/browser/google/google_url_tracker.h" 45 #include "chrome/browser/google/google_url_tracker.h"
46 #include "chrome/browser/google/google_util.h" 46 #include "chrome/browser/google/google_util.h"
47 #include "chrome/browser/instant/instant_field_trial.h" 47 #include "chrome/browser/instant/instant_field_trial.h"
48 #include "chrome/browser/jankometer.h" 48 #include "chrome/browser/jankometer.h"
49 #include "chrome/browser/language_usage_metrics.h" 49 #include "chrome/browser/language_usage_metrics.h"
50 #include "chrome/browser/metrics/field_trial_synchronizer.h" 50 #include "chrome/browser/metrics/field_trial_synchronizer.h"
51 #include "chrome/browser/metrics/histogram_synchronizer.h" 51 #include "chrome/browser/metrics/histogram_synchronizer.h"
52 #include "chrome/browser/metrics/metrics_log.h" 52 #include "chrome/browser/metrics/metrics_log.h"
53 #include "chrome/browser/metrics/metrics_service.h" 53 #include "chrome/browser/metrics/metrics_service.h"
54 #include "chrome/browser/metrics/thread_watcher.h" 54 #include "chrome/browser/metrics/thread_watcher.h"
55 #include "chrome/browser/nacl_host/nacl_process_host.h"
55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" 56 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h"
56 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" 57 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h"
57 #include "chrome/browser/net/chrome_net_log.h" 58 #include "chrome/browser/net/chrome_net_log.h"
58 #include "chrome/browser/net/predictor.h" 59 #include "chrome/browser/net/predictor.h"
59 #include "chrome/browser/plugin_prefs.h" 60 #include "chrome/browser/plugin_prefs.h"
60 #include "chrome/browser/policy/browser_policy_connector.h" 61 #include "chrome/browser/policy/browser_policy_connector.h"
61 #include "chrome/browser/prefs/pref_service.h" 62 #include "chrome/browser/prefs/pref_service.h"
62 #include "chrome/browser/prefs/pref_value_store.h" 63 #include "chrome/browser/prefs/pref_value_store.h"
63 #include "chrome/browser/prerender/prerender_field_trial.h" 64 #include "chrome/browser/prerender/prerender_field_trial.h"
64 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 65 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 1877
1877 // Initialize GpuDataManager and collect preliminary gpu info on FILE thread. 1878 // Initialize GpuDataManager and collect preliminary gpu info on FILE thread.
1878 // Upon completion, it posts GpuBlacklist auto update task on UI thread. 1879 // Upon completion, it posts GpuBlacklist auto update task on UI thread.
1879 BrowserThread::PostTask( 1880 BrowserThread::PostTask(
1880 BrowserThread::FILE, FROM_HERE, 1881 BrowserThread::FILE, FROM_HERE,
1881 base::Bind(&GpuBlacklistUpdater::SetupOnFileThread)); 1882 base::Bind(&GpuBlacklistUpdater::SetupOnFileThread));
1882 1883
1883 // Start watching all browser threads for responsiveness. 1884 // Start watching all browser threads for responsiveness.
1884 ThreadWatcherList::StartWatchingAll(parsed_command_line()); 1885 ThreadWatcherList::StartWatchingAll(parsed_command_line());
1885 1886
1887 #if !defined(DISABLE_NACL)
1888 NaClProcessHost::OpenIrtLibraryFile();
brettw 2011/10/28 18:54:32 You're doing blocking I/O on the UI thread blockin
Elliot Glaysher 2011/10/28 20:05:23 Agreed. To interact with the package manager corre
1889 #endif
1890
1886 int result_code = content::RESULT_CODE_NORMAL_EXIT; 1891 int result_code = content::RESULT_CODE_NORMAL_EXIT;
1887 base::mac::ScopedNSAutoreleasePool* pool = parameters().autorelease_pool_; 1892 base::mac::ScopedNSAutoreleasePool* pool = parameters().autorelease_pool_;
1888 if (parameters().ui_task) { 1893 if (parameters().ui_task) {
1889 // We are in test mode. Run one task and enter the main message loop. 1894 // We are in test mode. Run one task and enter the main message loop.
1890 if (pool) 1895 if (pool)
1891 pool->Recycle(); 1896 pool->Recycle();
1892 parameters().ui_task->Run(); 1897 parameters().ui_task->Run();
1893 delete parameters().ui_task; 1898 delete parameters().ui_task;
1894 } else { 1899 } else {
1895 // Most general initialization is behind us, but opening a 1900 // Most general initialization is behind us, but opening a
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2113 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2109 (pre_read == "0" || pre_read == "1")) { 2114 (pre_read == "0" || pre_read == "1")) {
2110 std::string uma_name(name); 2115 std::string uma_name(name);
2111 uma_name += "_PreRead"; 2116 uma_name += "_PreRead";
2112 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2117 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2113 AddPreReadHistogramTime(uma_name.c_str(), time); 2118 AddPreReadHistogramTime(uma_name.c_str(), time);
2114 } 2119 }
2115 #endif 2120 #endif
2116 #endif 2121 #endif
2117 } 2122 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/nacl_host/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698