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

Side by Side Diff: content/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: CHECK(fd > 0) -> CHECK_GE(fd, 0) 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 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_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 callback.Run(Shell::CreateNewWindow(browser_context, 334 callback.Run(Shell::CreateNewWindow(browser_context,
335 params.url, 335 params.url,
336 nullptr, 336 nullptr,
337 gfx::Size())->web_contents()); 337 gfx::Size())->web_contents());
338 } 338 }
339 339
340 #if defined(OS_POSIX) && !defined(OS_MACOSX) 340 #if defined(OS_POSIX) && !defined(OS_MACOSX)
341 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 341 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
342 const base::CommandLine& command_line, 342 const base::CommandLine& command_line,
343 int child_process_id, 343 int child_process_id,
344 FileDescriptorInfo* mappings) { 344 FileDescriptorInfo* mappings
345 #if defined(OS_ANDROID)
346 ,
347 std::map<int, base::MemoryMappedFile::Region>* regions
348 #endif
349 ) {
345 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 350 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
346 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) { 351 if (v8_natives_fd_.get() == -1 || v8_snapshot_fd_.get() == -1) {
347 int v8_natives_fd = -1; 352 int v8_natives_fd = -1;
348 int v8_snapshot_fd = -1; 353 int v8_snapshot_fd = -1;
349 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd, 354 if (gin::V8Initializer::OpenV8FilesForChildProcesses(&v8_natives_fd,
350 &v8_snapshot_fd)) { 355 &v8_snapshot_fd)) {
351 v8_natives_fd_.reset(v8_natives_fd); 356 v8_natives_fd_.reset(v8_natives_fd);
352 v8_snapshot_fd_.reset(v8_snapshot_fd); 357 v8_snapshot_fd_.reset(v8_snapshot_fd);
353 } 358 }
354 } 359 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 ShellBrowserContext* 430 ShellBrowserContext*
426 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 431 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
427 BrowserContext* content_browser_context) { 432 BrowserContext* content_browser_context) {
428 if (content_browser_context == browser_context()) 433 if (content_browser_context == browser_context())
429 return browser_context(); 434 return browser_context();
430 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 435 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
431 return off_the_record_browser_context(); 436 return off_the_record_browser_context();
432 } 437 }
433 438
434 } // namespace content 439 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698