| OLD | NEW |
| 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 "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 5 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/component_updater/pnacl_component_installer.h" | 12 #include "chrome/browser/component_updater/pnacl_component_installer.h" |
| 13 #if defined(ENABLE_EXTENSIONS) | 13 #if defined(ENABLE_EXTENSIONS) |
| 14 #include "chrome/browser/extensions/extension_service.h" | 14 #include "chrome/browser/extensions/extension_service.h" |
| 15 #endif | 15 #endif |
| 16 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" | 16 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 19 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 20 #include "chrome/common/channel_info.h" |
| 20 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 21 #include "chrome/common/chrome_paths_internal.h" | 22 #include "chrome/common/chrome_paths_internal.h" |
| 22 #include "chrome/common/chrome_version_info.h" | |
| 23 #include "chrome/common/logging_chrome.h" | 23 #include "chrome/common/logging_chrome.h" |
| 24 #include "chrome/common/pepper_permission_util.h" | 24 #include "chrome/common/pepper_permission_util.h" |
| 25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
| 26 #if defined(ENABLE_EXTENSIONS) | 26 #if defined(ENABLE_EXTENSIONS) |
| 27 #include "extensions/browser/extension_system.h" | 27 #include "extensions/browser/extension_system.h" |
| 28 #include "extensions/browser/info_map.h" | 28 #include "extensions/browser/info_map.h" |
| 29 #include "extensions/browser/process_manager.h" | 29 #include "extensions/browser/process_manager.h" |
| 30 #include "extensions/common/constants.h" | 30 #include "extensions/common/constants.h" |
| 31 #include "extensions/common/extension.h" | 31 #include "extensions/common/extension.h" |
| 32 #include "extensions/common/url_pattern.h" | 32 #include "extensions/common/url_pattern.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 bool NaClBrowserDelegateImpl::GetPnaclDirectory(base::FilePath* pnacl_dir) { | 127 bool NaClBrowserDelegateImpl::GetPnaclDirectory(base::FilePath* pnacl_dir) { |
| 128 return PathService::Get(chrome::DIR_PNACL_COMPONENT, pnacl_dir); | 128 return PathService::Get(chrome::DIR_PNACL_COMPONENT, pnacl_dir); |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool NaClBrowserDelegateImpl::GetUserDirectory(base::FilePath* user_dir) { | 131 bool NaClBrowserDelegateImpl::GetUserDirectory(base::FilePath* user_dir) { |
| 132 return PathService::Get(chrome::DIR_USER_DATA, user_dir); | 132 return PathService::Get(chrome::DIR_USER_DATA, user_dir); |
| 133 } | 133 } |
| 134 | 134 |
| 135 std::string NaClBrowserDelegateImpl::GetVersionString() const { | 135 std::string NaClBrowserDelegateImpl::GetVersionString() const { |
| 136 return chrome::VersionInfo().CreateVersionString(); | 136 return chrome::GetVersionString(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( | 139 ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( |
| 140 content::BrowserPpapiHost* ppapi_host) { | 140 content::BrowserPpapiHost* ppapi_host) { |
| 141 return new chrome::ChromeBrowserPepperHostFactory(ppapi_host); | 141 return new chrome::ChromeBrowserPepperHostFactory(ppapi_host); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void NaClBrowserDelegateImpl::SetDebugPatterns( | 144 void NaClBrowserDelegateImpl::SetDebugPatterns( |
| 145 const std::string& debug_patterns) { | 145 const std::string& debug_patterns) { |
| 146 #if defined(ENABLE_EXTENSIONS) | 146 #if defined(ENABLE_EXTENSIONS) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 const base::FilePath& profile_directory) { | 241 const base::FilePath& profile_directory) { |
| 242 // Get the profile associated with the renderer. | 242 // Get the profile associated with the renderer. |
| 243 Profile* profile = profile_manager_->GetProfileByPath(profile_directory); | 243 Profile* profile = profile_manager_->GetProfileByPath(profile_directory); |
| 244 DCHECK(profile); | 244 DCHECK(profile); |
| 245 scoped_refptr<extensions::InfoMap> extension_info_map = | 245 scoped_refptr<extensions::InfoMap> extension_info_map = |
| 246 extensions::ExtensionSystem::Get(profile)->info_map(); | 246 extensions::ExtensionSystem::Get(profile)->info_map(); |
| 247 DCHECK(extension_info_map.get()); | 247 DCHECK(extension_info_map.get()); |
| 248 return extension_info_map; | 248 return extension_info_map; |
| 249 } | 249 } |
| 250 #endif | 250 #endif |
| OLD | NEW |