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

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

Issue 1129233003: localStorage: Aggressively flush to disk for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-storage-flush-android
Patch Set: Added trace event. Created 5 years, 7 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 | « no previous file | content/browser/browser_main_loop.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 "android_webview/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include "android_webview/browser/aw_content_browser_client.h" 7 #include "android_webview/browser/aw_content_browser_client.h"
8 #include "android_webview/browser/browser_view_renderer.h" 8 #include "android_webview/browser/browser_view_renderer.h"
9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
10 #include "android_webview/crash_reporter/aw_microdump_crash_reporter.h" 10 #include "android_webview/crash_reporter/aw_microdump_crash_reporter.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // WebRTC hardware decoding is not supported, internal bug 15075307 83 // WebRTC hardware decoding is not supported, internal bug 15075307
84 cl->AppendSwitch(switches::kDisableWebRtcHWDecoding); 84 cl->AppendSwitch(switches::kDisableWebRtcHWDecoding);
85 cl->AppendSwitch(switches::kDisableAcceleratedVideoDecode); 85 cl->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
86 86
87 // This is needed for sharing textures across the different GL threads. 87 // This is needed for sharing textures across the different GL threads.
88 cl->AppendSwitch(switches::kEnableThreadedTextureMailboxes); 88 cl->AppendSwitch(switches::kEnableThreadedTextureMailboxes);
89 89
90 // WebView does not yet support screen orientation locking. 90 // WebView does not yet support screen orientation locking.
91 cl->AppendSwitch(switches::kDisableScreenOrientationLock); 91 cl->AppendSwitch(switches::kDisableScreenOrientationLock);
92 92
93 // WebView does not (yet) save Chromium data during shutdown, so add setting
94 // for Chrome to aggressively persist DOM Storage to minimize data loss.
95 // http://crbug.com/479767
96 cl->AppendSwitch(switches::kEnableAggressiveDOMStorageFlushing);
97
93 // This is needed to be able to mmap the V8 snapshot and ICU data file 98 // This is needed to be able to mmap the V8 snapshot and ICU data file
94 // directly from the WebView .apk. 99 // directly from the WebView .apk.
95 // This needs to be here so that it gets to run before the code in 100 // This needs to be here so that it gets to run before the code in
96 // content_main_runner that reads these values tries to do so. 101 // content_main_runner that reads these values tries to do so.
97 // In multi-process mode this code would live in 102 // In multi-process mode this code would live in
98 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess. 103 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess.
99 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 104 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
100 #ifdef __LP64__ 105 #ifdef __LP64__
101 const char kNativesFileName[] = "natives_blob_64.bin"; 106 const char kNativesFileName[] = "natives_blob_64.bin";
102 const char kSnapshotFileName[] = "snapshot_blob_64.bin"; 107 const char kSnapshotFileName[] = "snapshot_blob_64.bin";
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 #if defined(VIDEO_HOLE) 199 #if defined(VIDEO_HOLE)
195 content::ExternalVideoSurfaceContainer* 200 content::ExternalVideoSurfaceContainer*
196 AwMainDelegate::CreateExternalVideoSurfaceContainer( 201 AwMainDelegate::CreateExternalVideoSurfaceContainer(
197 content::WebContents* web_contents) { 202 content::WebContents* web_contents) {
198 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( 203 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create(
199 web_contents); 204 web_contents);
200 } 205 }
201 #endif 206 #endif
202 207
203 } // namespace android_webview 208 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698