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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 415773009: Re-enable various MSVC warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | device/bluetooth/bluetooth_service_record_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 894f773c40b86e1ffbb5ca1d19b24e41b880ad27..b814a9a474d30cec9bcae7736076d59565cc6c4d 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -590,13 +590,11 @@ PP_FileHandle CreateTemporaryFile(PP_Instance instance) {
}
int32_t GetNumberOfProcessors() {
- int32_t num_processors;
IPC::Sender* sender = content::RenderThread::Get();
DCHECK(sender);
- if(!sender->Send(new NaClHostMsg_NaClGetNumProcessors(&num_processors))) {
- return 1;
- }
- return num_processors;
+ int32_t num_processors = 1;
+ return sender->Send(new NaClHostMsg_NaClGetNumProcessors(&num_processors)) ?
+ num_processors : 1;
}
PP_Bool PPIsNonSFIModeEnabled() {
@@ -787,15 +785,13 @@ void InstanceDestroyed(PP_Instance instance) {
PP_Bool NaClDebugEnabledForURL(const char* alleged_nmf_url) {
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNaClDebug))
return PP_FALSE;
- bool should_debug;
IPC::Sender* sender = content::RenderThread::Get();
DCHECK(sender);
- if(!sender->Send(new NaClHostMsg_NaClDebugEnabledForURL(
- GURL(alleged_nmf_url),
- &should_debug))) {
- return PP_FALSE;
- }
- return PP_FromBool(should_debug);
+ bool should_debug = false;
+ return PP_FromBool(
+ sender->Send(new NaClHostMsg_NaClDebugEnabledForURL(GURL(alleged_nmf_url),
+ &should_debug)) &&
+ should_debug);
}
void LogToConsole(PP_Instance instance, const char* message) {
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | device/bluetooth/bluetooth_service_record_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698