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

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: Only logging LocalStorage.CommitDelay when not aggressive 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
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.
michaeln 2015/05/07 23:19:03 might be nice to put the link to the android speci
cmumford 2015/05/08 16:02:48 Done.
95 cl->AppendSwitch(switches::kEnableAggressiveDOMStorageFlushing);
96
93 // This is needed to be able to mmap the V8 snapshot and ICU data file 97 // This is needed to be able to mmap the V8 snapshot and ICU data file
94 // directly from the WebView .apk. 98 // directly from the WebView .apk.
95 // This needs to be here so that it gets to run before the code in 99 // 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. 100 // content_main_runner that reads these values tries to do so.
97 // In multi-process mode this code would live in 101 // In multi-process mode this code would live in
98 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess. 102 // AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess.
99 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 103 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
100 #ifdef __LP64__ 104 #ifdef __LP64__
101 const char kNativesFileName[] = "natives_blob_64.bin"; 105 const char kNativesFileName[] = "natives_blob_64.bin";
102 const char kSnapshotFileName[] = "snapshot_blob_64.bin"; 106 const char kSnapshotFileName[] = "snapshot_blob_64.bin";
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 #if defined(VIDEO_HOLE) 198 #if defined(VIDEO_HOLE)
195 content::ExternalVideoSurfaceContainer* 199 content::ExternalVideoSurfaceContainer*
196 AwMainDelegate::CreateExternalVideoSurfaceContainer( 200 AwMainDelegate::CreateExternalVideoSurfaceContainer(
197 content::WebContents* web_contents) { 201 content::WebContents* web_contents) {
198 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create( 202 return external_video_surface::ExternalVideoSurfaceContainerImpl::Create(
199 web_contents); 203 web_contents);
200 } 204 }
201 #endif 205 #endif
202 206
203 } // namespace android_webview 207 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | content/browser/dom_storage/dom_storage_area.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698