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

Side by Side Diff: content/shell/browser/shell_browser_main_parts.cc

Issue 1812883003: Enable features API for content shell and webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « content/shell/browser/shell_browser_main_parts.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/shell_browser_main_parts.h" 5 #include "content/shell/browser/shell_browser_main_parts.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
12 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
13 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
14 #include "base/threading/thread_restrictions.h" 15 #include "base/threading/thread_restrictions.h"
15 #include "build/build_config.h" 16 #include "build/build_config.h"
16 #include "components/devtools_http_handler/devtools_http_handler.h" 17 #include "components/devtools_http_handler/devtools_http_handler.h"
17 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/storage_partition.h" 19 #include "content/public/browser/storage_partition.h"
19 #include "content/public/common/content_switches.h" 20 #include "content/public/common/content_switches.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void ShellBrowserMainParts::PreEarlyInitialization() { 127 void ShellBrowserMainParts::PreEarlyInitialization() {
127 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) 128 #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
128 ui::InitializeInputMethodForTesting(); 129 ui::InitializeInputMethodForTesting();
129 #endif 130 #endif
130 #if defined(OS_ANDROID) 131 #if defined(OS_ANDROID)
131 net::NetworkChangeNotifier::SetFactory( 132 net::NetworkChangeNotifier::SetFactory(
132 new net::NetworkChangeNotifierFactoryAndroid()); 133 new net::NetworkChangeNotifierFactoryAndroid());
133 #endif 134 #endif
134 } 135 }
135 136
137 int ShellBrowserMainParts::PreCreateThreads() {
138 const base::CommandLine* command_line =
Alexei Svitkine (slow) 2016/03/18 15:03:42 Indent is wrong.
Changwan Ryu 2016/03/23 09:47:36 Done.
139 base::CommandLine::ForCurrentProcess();
140 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
141 feature_list->InitializeFromCommandLine(
142 command_line->GetSwitchValueASCII(switches::kEnableFeatures),
143 command_line->GetSwitchValueASCII(switches::kDisableFeatures));
144
145 base::FeatureList::SetInstance(std::move(feature_list));
Alexei Svitkine (slow) 2016/03/18 15:03:42 So this fails because an instance was already regi
Changwan Ryu 2016/03/23 09:47:36 Please check crbug.com/596021 for the different ap
146 return 0;
147 }
148
136 void ShellBrowserMainParts::InitializeBrowserContexts() { 149 void ShellBrowserMainParts::InitializeBrowserContexts() {
137 set_browser_context(new ShellBrowserContext(false, net_log_.get())); 150 set_browser_context(new ShellBrowserContext(false, net_log_.get()));
138 set_off_the_record_browser_context( 151 set_off_the_record_browser_context(
139 new ShellBrowserContext(true, net_log_.get())); 152 new ShellBrowserContext(true, net_log_.get()));
140 } 153 }
141 154
142 void ShellBrowserMainParts::InitializeMessageLoopContext() { 155 void ShellBrowserMainParts::InitializeMessageLoopContext() {
143 Shell::CreateNewWindow(browser_context_.get(), 156 Shell::CreateNewWindow(browser_context_.get(),
144 GetStartupURL(), 157 GetStartupURL(),
145 NULL, 158 NULL,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 device::BluetoothAdapterFactory::Shutdown(); 202 device::BluetoothAdapterFactory::Shutdown();
190 bluez::BluezDBusManager::Shutdown(); 203 bluez::BluezDBusManager::Shutdown();
191 chromeos::DBusThreadManager::Shutdown(); 204 chromeos::DBusThreadManager::Shutdown();
192 #elif defined(OS_LINUX) 205 #elif defined(OS_LINUX)
193 device::BluetoothAdapterFactory::Shutdown(); 206 device::BluetoothAdapterFactory::Shutdown();
194 bluez::DBusBluezManagerWrapperLinux::Shutdown(); 207 bluez::DBusBluezManagerWrapperLinux::Shutdown();
195 #endif 208 #endif
196 } 209 }
197 210
198 } // namespace 211 } // namespace
OLDNEW
« no previous file with comments | « content/shell/browser/shell_browser_main_parts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698