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

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

Issue 10115048: Fix single process mode in content_shell. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | content/browser/browser_main_runner.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/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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "chrome/common/env_vars.h" 91 #include "chrome/common/env_vars.h"
92 #include "chrome/common/json_pref_store.h" 92 #include "chrome/common/json_pref_store.h"
93 #include "chrome/common/jstemplate_builder.h" 93 #include "chrome/common/jstemplate_builder.h"
94 #include "chrome/common/logging_chrome.h" 94 #include "chrome/common/logging_chrome.h"
95 #include "chrome/common/net/net_resource_provider.h" 95 #include "chrome/common/net/net_resource_provider.h"
96 #include "chrome/common/pref_names.h" 96 #include "chrome/common/pref_names.h"
97 #include "chrome/common/profiling.h" 97 #include "chrome/common/profiling.h"
98 #include "chrome/installer/util/google_update_settings.h" 98 #include "chrome/installer/util/google_update_settings.h"
99 #include "content/public/browser/browser_thread.h" 99 #include "content/public/browser/browser_thread.h"
100 #include "content/public/browser/gpu_data_manager.h" 100 #include "content/public/browser/gpu_data_manager.h"
101 #include "content/public/browser/render_process_host.h"
101 #include "content/public/common/content_client.h" 102 #include "content/public/common/content_client.h"
102 #include "content/public/common/main_function_params.h" 103 #include "content/public/common/main_function_params.h"
103 #include "grit/app_locale_settings.h" 104 #include "grit/app_locale_settings.h"
104 #include "grit/browser_resources.h" 105 #include "grit/browser_resources.h"
105 #include "grit/chromium_strings.h" 106 #include "grit/chromium_strings.h"
106 #include "grit/generated_resources.h" 107 #include "grit/generated_resources.h"
107 #include "grit/platform_locale_settings.h" 108 #include "grit/platform_locale_settings.h"
108 #include "net/base/net_module.h" 109 #include "net/base/net_module.h"
109 #include "net/base/sdch_manager.h" 110 #include "net/base/sdch_manager.h"
110 #include "net/cookies/cookie_monster.h" 111 #include "net/cookies/cookie_monster.h"
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 // deletions. We need this new instance because, the old instance created 1105 // deletions. We need this new instance because, the old instance created
1105 // in ChromeMain() got destructed when the function returned. 1106 // in ChromeMain() got destructed when the function returned.
1106 base::AtExitManager exit_manager; 1107 base::AtExitManager exit_manager;
1107 upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded(); 1108 upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded();
1108 } 1109 }
1109 #endif 1110 #endif
1110 1111
1111 // content::BrowserMainParts implementation ------------------------------------ 1112 // content::BrowserMainParts implementation ------------------------------------
1112 1113
1113 void ChromeBrowserMainParts::PreEarlyInitialization() { 1114 void ChromeBrowserMainParts::PreEarlyInitialization() {
1115 // Single-process is an unsupported and not fully tested mode, so
1116 // don't enable it for official Chrome builds (by not setting the client, the
1117 #if defined(GOOGLE_CHROME_BUILD)
1118 if (content::RenderProcessHost::run_renderer_in_process())
1119 content::RenderProcessHost::set_run_renderer_in_process(false);
1120 #endif // GOOGLE_CHROME_BUILD
1121
1114 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1122 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1115 chrome_extra_parts_[i]->PreEarlyInitialization(); 1123 chrome_extra_parts_[i]->PreEarlyInitialization();
1116 } 1124 }
1117 1125
1118 void ChromeBrowserMainParts::PostEarlyInitialization() { 1126 void ChromeBrowserMainParts::PostEarlyInitialization() {
1119 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 1127 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
1120 chrome_extra_parts_[i]->PostEarlyInitialization(); 1128 chrome_extra_parts_[i]->PostEarlyInitialization();
1121 } 1129 }
1122 1130
1123 void ChromeBrowserMainParts::ToolkitInitialized() { 1131 void ChromeBrowserMainParts::ToolkitInitialized() {
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 if (base::win::GetVersion() <= base::win::VERSION_XP) 1947 if (base::win::GetVersion() <= base::win::VERSION_XP)
1940 uma_name += "_XP"; 1948 uma_name += "_XP";
1941 1949
1942 uma_name += "_PreRead_"; 1950 uma_name += "_PreRead_";
1943 uma_name += pre_read_percentage; 1951 uma_name += pre_read_percentage;
1944 AddPreReadHistogramTime(uma_name.c_str(), time); 1952 AddPreReadHistogramTime(uma_name.c_str(), time);
1945 } 1953 }
1946 #endif 1954 #endif
1947 #endif 1955 #endif
1948 } 1956 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | content/browser/browser_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698