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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Fix Mojo launcher, review comments Created 3 years, 5 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 "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 else 541 else
542 return nullptr; 542 return nullptr;
543 base::StringPiece manifest_contents = 543 base::StringPiece manifest_contents =
544 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); 544 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE);
545 return base::JSONReader::Read(manifest_contents); 545 return base::JSONReader::Read(manifest_contents);
546 } 546 }
547 547
548 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 548 void CastContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
549 const base::CommandLine& command_line, 549 const base::CommandLine& command_line,
550 int child_process_id, 550 int child_process_id,
551 content::FileDescriptorInfo* mappings) { 551 content::PosixFileDescriptorInfo* mappings) {
552 #if defined(OS_ANDROID) 552 #if defined(OS_ANDROID)
553 mappings->ShareWithRegion( 553 mappings->ShareWithRegion(
554 kAndroidPakDescriptor, 554 kAndroidPakDescriptor,
555 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor), 555 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor),
556 base::GlobalDescriptors::GetInstance()->GetRegion(kAndroidPakDescriptor)); 556 base::GlobalDescriptors::GetInstance()->GetRegion(kAndroidPakDescriptor));
557 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( 557 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
558 child_process_id, mappings); 558 child_process_id, mappings);
559 #else 559 #else
560 int crash_signal_fd = GetCrashSignalFD(command_line); 560 int crash_signal_fd = GetCrashSignalFD(command_line);
561 if (crash_signal_fd >= 0) { 561 if (crash_signal_fd >= 0) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 process_type, dumps_path, false /* upload */); 609 process_type, dumps_path, false /* upload */);
610 // StartUploaderThread() even though upload is diferred. 610 // StartUploaderThread() even though upload is diferred.
611 // Breakpad-related memory is freed in the uploader thread. 611 // Breakpad-related memory is freed in the uploader thread.
612 crash_handler->StartUploaderThread(); 612 crash_handler->StartUploaderThread();
613 return crash_handler; 613 return crash_handler;
614 } 614 }
615 #endif // !defined(OS_ANDROID) 615 #endif // !defined(OS_ANDROID)
616 616
617 } // namespace shell 617 } // namespace shell
618 } // namespace chromecast 618 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698