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

Side by Side Diff: chrome/renderer/renderer_main.cc

Issue 210027: Move FTP LIST parsing code to the renderer process. (Closed)
Patch Set: fixes Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/l10n_util.h" 5 #include "app/l10n_util.h"
6 #include "app/resource_bundle.h" 6 #include "app/resource_bundle.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/field_trial.h" 8 #include "base/field_trial.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/platform_thread.h" 12 #include "base/platform_thread.h"
13 #include "base/process_util.h" 13 #include "base/process_util.h"
14 #include "base/scoped_nsautorelease_pool.h" 14 #include "base/scoped_nsautorelease_pool.h"
15 #include "base/stats_counters.h" 15 #include "base/stats_counters.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/system_monitor.h" 17 #include "base/system_monitor.h"
18 #include "chrome/common/chrome_constants.h" 18 #include "chrome/common/chrome_constants.h"
19 #include "chrome/common/chrome_counters.h" 19 #include "chrome/common/chrome_counters.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/logging_chrome.h" 21 #include "chrome/common/logging_chrome.h"
22 #include "chrome/common/main_function_params.h" 22 #include "chrome/common/main_function_params.h"
23 #include "chrome/common/net/net_resource_provider.h"
23 #include "chrome/renderer/renderer_main_platform_delegate.h" 24 #include "chrome/renderer/renderer_main_platform_delegate.h"
24 #include "chrome/renderer/render_process.h" 25 #include "chrome/renderer/render_process.h"
25 #include "chrome/renderer/render_thread.h" 26 #include "chrome/renderer/render_thread.h"
26 #include "grit/chromium_strings.h" 27 #include "grit/chromium_strings.h"
27 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
29 #include "net/base/net_module.h"
28 30
29 #if defined(OS_LINUX) 31 #if defined(OS_LINUX)
30 #include "chrome/app/breakpad_linux.h" 32 #include "chrome/app/breakpad_linux.h"
31 #endif 33 #endif
32 34
33 #if defined(OS_POSIX) 35 #if defined(OS_POSIX)
34 #include <signal.h> 36 #include <signal.h>
35 37
36 static void SigUSR1Handler(int signal) { } 38 static void SigUSR1Handler(int signal) { }
37 #endif 39 #endif
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // mainline routine for running as the Renderer process 81 // mainline routine for running as the Renderer process
80 int RendererMain(const MainFunctionParams& parameters) { 82 int RendererMain(const MainFunctionParams& parameters) {
81 const CommandLine& parsed_command_line = parameters.command_line_; 83 const CommandLine& parsed_command_line = parameters.command_line_;
82 base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; 84 base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_;
83 85
84 #if defined(OS_LINUX) 86 #if defined(OS_LINUX)
85 // Needs to be called after we have chrome::DIR_USER_DATA. 87 // Needs to be called after we have chrome::DIR_USER_DATA.
86 InitCrashReporter(); 88 InitCrashReporter();
87 #endif 89 #endif
88 90
91 // Configure the network module so it has access to resources.
92 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
93
89 // This function allows pausing execution using the --renderer-startup-dialog 94 // This function allows pausing execution using the --renderer-startup-dialog
90 // flag allowing us to attach a debugger. 95 // flag allowing us to attach a debugger.
91 // Do not move this function down since that would mean we can't easily debug 96 // Do not move this function down since that would mean we can't easily debug
92 // whatever occurs before it. 97 // whatever occurs before it.
93 HandleRendererErrorTestParameters(parsed_command_line); 98 HandleRendererErrorTestParameters(parsed_command_line);
94 99
95 RendererMainPlatformDelegate platform(parameters); 100 RendererMainPlatformDelegate platform(parameters);
96 101
97 StatsScope<StatsCounterTimer> 102 StatsScope<StatsCounterTimer>
98 startup_timer(chrome::Counters::renderer_main()); 103 startup_timer(chrome::Counters::renderer_main());
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 163
159 if (run_loop) { 164 if (run_loop) {
160 if (pool) 165 if (pool)
161 pool->Recycle(); 166 pool->Recycle();
162 MessageLoop::current()->Run(); 167 MessageLoop::current()->Run();
163 } 168 }
164 } 169 }
165 platform.PlatformUninitialize(); 170 platform.PlatformUninitialize();
166 return 0; 171 return 0;
167 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698