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

Side by Side Diff: extensions/shell/browser/shell_content_browser_client.cc

Issue 1147213004: Store and load icudtl.dat directly from the apk rather than extracting on start-up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@load-from-apk
Patch Set: Keep extracting for components/ Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_content_browser_client.h" 5 #include "extensions/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/guest_view/browser/guest_view_message_filter.h" 8 #include "components/guest_view/browser/guest_view_message_filter.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 std::vector<std::string>* additional_allowed_schemes) { 246 std::vector<std::string>* additional_allowed_schemes) {
247 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( 247 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
248 additional_allowed_schemes); 248 additional_allowed_schemes);
249 additional_allowed_schemes->push_back(kExtensionScheme); 249 additional_allowed_schemes->push_back(kExtensionScheme);
250 } 250 }
251 251
252 #if defined(OS_POSIX) && !defined(OS_MACOSX) 252 #if defined(OS_POSIX) && !defined(OS_MACOSX)
253 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 253 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
254 const base::CommandLine& command_line, 254 const base::CommandLine& command_line,
255 int child_process_id, 255 int child_process_id,
256 content::FileDescriptorInfo* mappings) { 256 content::FileDescriptorInfo* mappings
257 #if defined(OS_ANDROID)
258 , std::map<int, base::MemoryMappedFile::Region>* regions
259 #endif
260 ) {
257 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 261 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
258 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { 262 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) {
259 int v8_natives_fd = -1; 263 int v8_natives_fd = -1;
260 int v8_snapshot_fd = -1; 264 int v8_snapshot_fd = -1;
261 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, 265 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd,
262 &v8_snapshot_fd)) { 266 &v8_snapshot_fd)) {
263 v8_natives_fd_.reset(v8_natives_fd); 267 v8_natives_fd_.reset(v8_natives_fd);
264 v8_snapshot_fd_.reset(v8_snapshot_fd); 268 v8_snapshot_fd_.reset(v8_snapshot_fd);
265 } 269 }
266 } 270 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 306
303 const Extension* ShellContentBrowserClient::GetExtension( 307 const Extension* ShellContentBrowserClient::GetExtension(
304 content::SiteInstance* site_instance) { 308 content::SiteInstance* site_instance) {
305 ExtensionRegistry* registry = 309 ExtensionRegistry* registry =
306 ExtensionRegistry::Get(site_instance->GetBrowserContext()); 310 ExtensionRegistry::Get(site_instance->GetBrowserContext());
307 return registry->enabled_extensions().GetExtensionOrAppByURL( 311 return registry->enabled_extensions().GetExtensionOrAppByURL(
308 site_instance->GetSiteURL()); 312 site_instance->GetSiteURL());
309 } 313 }
310 314
311 } // namespace extensions 315 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698