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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1622743005: Introduce background Download process to android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <string> 10 #include <string>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 extern int GpuMain(const content::MainFunctionParams&); 125 extern int GpuMain(const content::MainFunctionParams&);
126 #if defined(ENABLE_PLUGINS) 126 #if defined(ENABLE_PLUGINS)
127 #if !defined(OS_LINUX) 127 #if !defined(OS_LINUX)
128 extern int PluginMain(const content::MainFunctionParams&); 128 extern int PluginMain(const content::MainFunctionParams&);
129 #endif 129 #endif
130 extern int PpapiPluginMain(const MainFunctionParams&); 130 extern int PpapiPluginMain(const MainFunctionParams&);
131 extern int PpapiBrokerMain(const MainFunctionParams&); 131 extern int PpapiBrokerMain(const MainFunctionParams&);
132 #endif 132 #endif
133 extern int RendererMain(const content::MainFunctionParams&); 133 extern int RendererMain(const content::MainFunctionParams&);
134 extern int UtilityMain(const MainFunctionParams&); 134 extern int UtilityMain(const MainFunctionParams&);
135 #if defined(OS_ANDROID)
136 extern int DownloadMain(const MainFunctionParams&);
137 #endif
135 } // namespace content 138 } // namespace content
136 139
137 namespace content { 140 namespace content {
138 141
139 #if !defined(CHROME_MULTIPLE_DLL_CHILD) 142 #if !defined(CHROME_MULTIPLE_DLL_CHILD)
140 base::LazyInstance<ContentBrowserClient> 143 base::LazyInstance<ContentBrowserClient>
141 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; 144 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER;
142 #endif // !CHROME_MULTIPLE_DLL_CHILD 145 #endif // !CHROME_MULTIPLE_DLL_CHILD
143 146
144 #if !defined(OS_IOS) && !defined(CHROME_MULTIPLE_DLL_BROWSER) 147 #if !defined(OS_IOS) && !defined(CHROME_MULTIPLE_DLL_BROWSER)
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 #if defined(ENABLE_PLUGINS) 354 #if defined(ENABLE_PLUGINS)
352 #if !defined(OS_LINUX) 355 #if !defined(OS_LINUX)
353 { switches::kPluginProcess, PluginMain }, 356 { switches::kPluginProcess, PluginMain },
354 #endif 357 #endif
355 { switches::kPpapiPluginProcess, PpapiPluginMain }, 358 { switches::kPpapiPluginProcess, PpapiPluginMain },
356 { switches::kPpapiBrokerProcess, PpapiBrokerMain }, 359 { switches::kPpapiBrokerProcess, PpapiBrokerMain },
357 #endif // ENABLE_PLUGINS 360 #endif // ENABLE_PLUGINS
358 { switches::kUtilityProcess, UtilityMain }, 361 { switches::kUtilityProcess, UtilityMain },
359 { switches::kRendererProcess, RendererMain }, 362 { switches::kRendererProcess, RendererMain },
360 { switches::kGpuProcess, GpuMain }, 363 { switches::kGpuProcess, GpuMain },
364 #if defined(OS_ANDROID)
365 {switches::kDownloadProcess, DownloadMain},
svaldez 2016/01/25 15:33:43 nit: Space "DownloadMain }"
qinmin 2016/01/25 22:48:23 Done.
366 #endif
361 #endif // !CHROME_MULTIPLE_DLL_BROWSER 367 #endif // !CHROME_MULTIPLE_DLL_BROWSER
362 }; 368 };
363 369
364 RegisterMainThreadFactories(); 370 RegisterMainThreadFactories();
365 371
366 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { 372 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
367 if (process_type == kMainFunctions[i].name) { 373 if (process_type == kMainFunctions[i].name) {
368 if (delegate) { 374 if (delegate) {
369 int exit_code = delegate->RunProcess(process_type, 375 int exit_code = delegate->RunProcess(process_type,
370 main_function_params); 376 main_function_params);
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 852
847 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 853 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
848 }; 854 };
849 855
850 // static 856 // static
851 ContentMainRunner* ContentMainRunner::Create() { 857 ContentMainRunner* ContentMainRunner::Create() {
852 return new ContentMainRunnerImpl(); 858 return new ContentMainRunnerImpl();
853 } 859 }
854 860
855 } // namespace content 861 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698