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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2950153002: Improve process launch handle sharing API. (Closed)
Patch Set: Fix 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 (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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 using content::RenderFrameHost; 416 using content::RenderFrameHost;
417 using content::RenderViewHost; 417 using content::RenderViewHost;
418 using content::ResourceType; 418 using content::ResourceType;
419 using content::SiteInstance; 419 using content::SiteInstance;
420 using content::WebContents; 420 using content::WebContents;
421 using content::WebPreferences; 421 using content::WebPreferences;
422 using message_center::NotifierId; 422 using message_center::NotifierId;
423 using security_interstitials::SSLErrorUI; 423 using security_interstitials::SSLErrorUI;
424 424
425 #if defined(OS_POSIX) 425 #if defined(OS_POSIX)
426 using content::FileDescriptorInfo; 426 using content::PosixFileDescriptorInfo;
427 #endif 427 #endif
428 428
429 #if BUILDFLAG(ENABLE_EXTENSIONS) 429 #if BUILDFLAG(ENABLE_EXTENSIONS)
430 using extensions::APIPermission; 430 using extensions::APIPermission;
431 using extensions::ChromeContentBrowserClientExtensionsPart; 431 using extensions::ChromeContentBrowserClientExtensionsPart;
432 using extensions::Extension; 432 using extensions::Extension;
433 using extensions::InfoMap; 433 using extensions::InfoMap;
434 using extensions::Manifest; 434 using extensions::Manifest;
435 #endif 435 #endif
436 436
(...skipping 2335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 for (size_t i = 0; i < extra_parts_.size(); ++i) { 2772 for (size_t i = 0; i < extra_parts_.size(); ++i) {
2773 extra_parts_[i]->GetAdditionalFileSystemBackends( 2773 extra_parts_[i]->GetAdditionalFileSystemBackends(
2774 browser_context, storage_partition_path, additional_backends); 2774 browser_context, storage_partition_path, additional_backends);
2775 } 2775 }
2776 } 2776 }
2777 2777
2778 #if defined(OS_POSIX) && !defined(OS_MACOSX) 2778 #if defined(OS_POSIX) && !defined(OS_MACOSX)
2779 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 2779 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
2780 const base::CommandLine& command_line, 2780 const base::CommandLine& command_line,
2781 int child_process_id, 2781 int child_process_id,
2782 FileDescriptorInfo* mappings) { 2782 PosixFileDescriptorInfo* mappings) {
2783 #if defined(OS_ANDROID) 2783 #if defined(OS_ANDROID)
2784 base::MemoryMappedFile::Region region; 2784 base::MemoryMappedFile::Region region;
2785 int fd = ui::GetMainAndroidPackFd(&region); 2785 int fd = ui::GetMainAndroidPackFd(&region);
2786 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); 2786 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region);
2787 2787
2788 fd = ui::GetCommonResourcesPackFd(&region); 2788 fd = ui::GetCommonResourcesPackFd(&region);
2789 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); 2789 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region);
2790 2790
2791 fd = ui::GetLocalePackFd(&region); 2791 fd = ui::GetLocalePackFd(&region);
2792 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); 2792 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region);
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
3466 // displayed URL when rewriting chrome://help to chrome://settings/help. 3466 // displayed URL when rewriting chrome://help to chrome://settings/help.
3467 return url->SchemeIs(content::kChromeUIScheme) && 3467 return url->SchemeIs(content::kChromeUIScheme) &&
3468 url->host() == chrome::kChromeUISettingsHost; 3468 url->host() == chrome::kChromeUISettingsHost;
3469 } 3469 }
3470 3470
3471 // static 3471 // static
3472 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3472 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3473 const storage::QuotaSettings* settings) { 3473 const storage::QuotaSettings* settings) {
3474 g_default_quota_settings = settings; 3474 g_default_quota_settings = settings;
3475 } 3475 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698