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" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // associated extension process manager. | 52 // associated extension process manager. |
53 // | 53 // |
54 // There is a 1:many relationship for extension:nacl-embeds, but only a | 54 // There is a 1:many relationship for extension:nacl-embeds, but only a |
55 // 1:1 relationship for NaClProcessHost:PP_Instance. The content layer doesn't | 55 // 1:1 relationship for NaClProcessHost:PP_Instance. The content layer doesn't |
56 // rely on this knowledge because it routes messages for ppapi non-nacl | 56 // rely on this knowledge because it routes messages for ppapi non-nacl |
57 // instances as well, though they won't have callbacks set. Here the 1:1 | 57 // instances as well, though they won't have callbacks set. Here the 1:1 |
58 // assumption is made and DCHECKed. | 58 // assumption is made and DCHECKed. |
59 void OnKeepaliveOnUIThread( | 59 void OnKeepaliveOnUIThread( |
60 const content::BrowserPpapiHost::OnKeepaliveInstanceData& instance_data, | 60 const content::BrowserPpapiHost::OnKeepaliveInstanceData& instance_data, |
61 const base::FilePath& profile_data_directory) { | 61 const base::FilePath& profile_data_directory) { |
62 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 62 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
63 | 63 |
64 // Only one instance will exist for NaCl embeds, even when more than one | 64 // Only one instance will exist for NaCl embeds, even when more than one |
65 // embed of the same plugin exists on the same page. | 65 // embed of the same plugin exists on the same page. |
66 DCHECK_EQ(1U, instance_data.size()); | 66 DCHECK_EQ(1U, instance_data.size()); |
67 if (instance_data.size() < 1) | 67 if (instance_data.size() < 1) |
68 return; | 68 return; |
69 | 69 |
70 #if defined(ENABLE_EXTENSIONS) | 70 #if defined(ENABLE_EXTENSIONS) |
71 extensions::ProcessManager::OnKeepaliveFromPlugin( | 71 extensions::ProcessManager::OnKeepaliveFromPlugin( |
72 instance_data[0].render_process_id, | 72 instance_data[0].render_process_id, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 const base::FilePath& profile_directory) { | 240 const base::FilePath& profile_directory) { |
241 // Get the profile associated with the renderer. | 241 // Get the profile associated with the renderer. |
242 Profile* profile = profile_manager_->GetProfileByPath(profile_directory); | 242 Profile* profile = profile_manager_->GetProfileByPath(profile_directory); |
243 DCHECK(profile); | 243 DCHECK(profile); |
244 scoped_refptr<extensions::InfoMap> extension_info_map = | 244 scoped_refptr<extensions::InfoMap> extension_info_map = |
245 extensions::ExtensionSystem::Get(profile)->info_map(); | 245 extensions::ExtensionSystem::Get(profile)->info_map(); |
246 DCHECK(extension_info_map.get()); | 246 DCHECK(extension_info_map.get()); |
247 return extension_info_map; | 247 return extension_info_map; |
248 } | 248 } |
249 #endif | 249 #endif |
OLD | NEW |