OLD | NEW |
---|---|
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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 switches::kEnableBundledPpapiFlash); | 224 switches::kEnableBundledPpapiFlash); |
225 #endif | 225 #endif |
226 bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch( | 226 bundled_flapper_enabled &= !CommandLine::ForCurrentProcess()->HasSwitch( |
227 switches::kDisableBundledPpapiFlash); | 227 switches::kDisableBundledPpapiFlash); |
228 if (!bundled_flapper_enabled) | 228 if (!bundled_flapper_enabled) |
229 return; | 229 return; |
230 | 230 |
231 #if defined(FLAPPER_AVAILABLE) | 231 #if defined(FLAPPER_AVAILABLE) |
232 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin.path)) | 232 if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin.path)) |
233 return; | 233 return; |
234 DCHECK(file_util::PathExists(plugin.path)) | |
viettrungluu
2012/04/18 16:24:39
This, I believe, causes file IO to be done on the
Joao da Silva
2012/04/19 13:27:22
This function is similar to ComputeBuiltInPlugins(
viettrungluu
2012/04/19 23:34:25
ComputeBuiltInPlugins() should be fixed. Well, mor
viettrungluu
2012/04/20 05:32:11
Forgot to say: lgtm with a less verbose message.
Joao da Silva
2012/04/20 10:00:30
Removed the log message altogether, and left a com
| |
235 << "FLAPPER_AVAILABLE is defined but the plugin does not exist. " | |
236 << "Use --" << switches::kDisableBundledPpapiFlash; | |
234 flash_version = FLAPPER_VERSION_STRING; | 237 flash_version = FLAPPER_VERSION_STRING; |
235 #else | 238 #else |
236 LOG(ERROR) << "PPAPI Flash not included at build time."; | 239 LOG(ERROR) << "PPAPI Flash not included at build time."; |
237 return; | 240 return; |
238 #endif // FLAPPER_AVAILABLE | 241 #endif // FLAPPER_AVAILABLE |
239 } | 242 } |
240 | 243 |
241 std::vector<std::string> flash_version_numbers; | 244 std::vector<std::string> flash_version_numbers; |
242 base::SplitString(flash_version, '.', &flash_version_numbers); | 245 base::SplitString(flash_version, '.', &flash_version_numbers); |
243 if (flash_version_numbers.size() < 1) | 246 if (flash_version_numbers.size() < 1) |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 DCHECK(sandbox_profile_resource_id); | 456 DCHECK(sandbox_profile_resource_id); |
454 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { | 457 if (sandbox_type == CHROME_SANDBOX_TYPE_NACL_LOADER) { |
455 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 458 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
456 return true; | 459 return true; |
457 } | 460 } |
458 return false; | 461 return false; |
459 } | 462 } |
460 #endif | 463 #endif |
461 | 464 |
462 } // namespace chrome | 465 } // namespace chrome |
OLD | NEW |