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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 10035024: DCHECK earlier if pepper flash is missing even though FLAPPER_AVAILABLE is defined. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698