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

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 2615393002: Implement the basics for Safebrowsing for WebView (Closed)
Patch Set: more cleanup Created 3 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
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.h ('k') | android_webview/native/aw_contents.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) 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 "android_webview/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "android_webview/browser/aw_content_browser_client.h" 9 #include "android_webview/browser/aw_content_browser_client.h"
10 #include "android_webview/browser/browser_view_renderer.h" 10 #include "android_webview/browser/browser_view_renderer.h"
(...skipping 12 matching lines...) Expand all
23 #include "android_webview/renderer/aw_content_renderer_client.h" 23 #include "android_webview/renderer/aw_content_renderer_client.h"
24 #include "base/android/apk_assets.h" 24 #include "base/android/apk_assets.h"
25 #include "base/command_line.h" 25 #include "base/command_line.h"
26 #include "base/cpu.h" 26 #include "base/cpu.h"
27 #include "base/i18n/icu_util.h" 27 #include "base/i18n/icu_util.h"
28 #include "base/lazy_instance.h" 28 #include "base/lazy_instance.h"
29 #include "base/logging.h" 29 #include "base/logging.h"
30 #include "base/threading/thread_restrictions.h" 30 #include "base/threading/thread_restrictions.h"
31 #include "cc/base/switches.h" 31 #include "cc/base/switches.h"
32 #include "components/crash/content/app/breakpad_linux.h" 32 #include "components/crash/content/app/breakpad_linux.h"
33 #include "components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h "
33 #include "components/spellcheck/common/spellcheck_features.h" 34 #include "components/spellcheck/common/spellcheck_features.h"
34 #include "content/public/browser/android/browser_media_player_manager_register.h " 35 #include "content/public/browser/android/browser_media_player_manager_register.h "
35 #include "content/public/browser/browser_main_runner.h" 36 #include "content/public/browser/browser_main_runner.h"
36 #include "content/public/browser/browser_thread.h" 37 #include "content/public/browser/browser_thread.h"
37 #include "content/public/common/content_descriptors.h" 38 #include "content/public/common/content_descriptors.h"
38 #include "content/public/common/content_features.h" 39 #include "content/public/common/content_features.h"
39 #include "content/public/common/content_switches.h" 40 #include "content/public/common/content_switches.h"
40 #include "gin/public/isolate_holder.h" 41 #include "gin/public/isolate_holder.h"
41 #include "gin/v8_initializer.h" 42 #include "gin/v8_initializer.h"
42 #include "gpu/command_buffer/service/gpu_switches.h" 43 #include "gpu/command_buffer/service/gpu_switches.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 cl->AppendSwitch(switches::kInProcessGPU); 146 cl->AppendSwitch(switches::kInProcessGPU);
146 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1"); 147 cl->AppendSwitchASCII(switches::kRendererProcessLimit, "1");
147 cl->AppendSwitch(switches::kDisableRendererBackgrounding); 148 cl->AppendSwitch(switches::kDisableRendererBackgrounding);
148 } 149 }
149 150
150 CommandLineHelper::AddEnabledFeature( 151 CommandLineHelper::AddEnabledFeature(
151 *cl, spellcheck::kAndroidSpellCheckerNonLowEnd.name); 152 *cl, spellcheck::kAndroidSpellCheckerNonLowEnd.name);
152 153
153 CommandLineHelper::AddDisabledFeature(*cl, features::kWebPayments.name); 154 CommandLineHelper::AddDisabledFeature(*cl, features::kWebPayments.name);
154 155
156 safe_browsing_api_handler_.reset(
157 new safe_browsing::SafeBrowsingApiHandlerBridge());
158 safe_browsing::SafeBrowsingApiHandler::SetInstance(
159 safe_browsing_api_handler_.get());
160
155 return false; 161 return false;
156 } 162 }
157 163
158 void AwMainDelegate::PreSandboxStartup() { 164 void AwMainDelegate::PreSandboxStartup() {
159 #if defined(ARCH_CPU_ARM_FAMILY) 165 #if defined(ARCH_CPU_ARM_FAMILY)
160 // Create an instance of the CPU class to parse /proc/cpuinfo and cache 166 // Create an instance of the CPU class to parse /proc/cpuinfo and cache
161 // cpu_brand info. 167 // cpu_brand info.
162 base::CPU cpu_info; 168 base::CPU cpu_info;
163 #endif 169 #endif
164 170
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 274
269 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { 275 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() {
270 return new AwWebPreferencesPopulaterImpl(); 276 return new AwWebPreferencesPopulaterImpl();
271 } 277 }
272 278
273 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() { 279 AwLocaleManager* AwMainDelegate::CreateAwLocaleManager() {
274 return new AwLocaleManagerImpl(); 280 return new AwLocaleManagerImpl();
275 } 281 }
276 282
277 } // namespace android_webview 283 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.h ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698