diff options
60 files changed, 71 insertions, 76 deletions
diff --git a/ash/test/test_keyboard_ui.cc b/ash/test/test_keyboard_ui.cc index 67b6993..20f9b44 100644 --- a/ash/test/test_keyboard_ui.cc +++ b/ash/test/test_keyboard_ui.cc @@ -17,7 +17,7 @@ TestKeyboardUI::TestKeyboardUI() {} TestKeyboardUI::~TestKeyboardUI() {} bool TestKeyboardUI::HasKeyboardWindow() const { - return keyboard_; + return !!keyboard_; } bool TestKeyboardUI::ShouldWindowOverscroll(aura::Window* window) const { diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc index 21a69d9..e009709 100644 --- a/ash/wm/window_state.cc +++ b/ash/wm/window_state.cc @@ -92,7 +92,7 @@ WindowState::~WindowState() { } bool WindowState::HasDelegate() const { - return delegate_; + return !!delegate_; } void WindowState::SetDelegate(scoped_ptr<WindowStateDelegate> delegate) { diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h index c17dc0d..8bf338e 100644 --- a/ash/wm/window_state.h +++ b/ash/wm/window_state.h @@ -231,9 +231,7 @@ class ASH_EXPORT WindowState : public aura::WindowObserver { void RemoveObserver(WindowStateObserver* observer); // Whether the window is being dragged. - bool is_dragged() const { - return drag_details_; - } + bool is_dragged() const { return !!drag_details_; } // Whether or not the window's position can be managed by the // auto management logic. diff --git a/blimp/net/blimp_message_output_buffer.cc b/blimp/net/blimp_message_output_buffer.cc index d6111e4..678acc3 100644 --- a/blimp/net/blimp_message_output_buffer.cc +++ b/blimp/net/blimp_message_output_buffer.cc @@ -59,7 +59,7 @@ int BlimpMessageOutputBuffer::GetUnacknowledgedMessageCountForTest() const { void BlimpMessageOutputBuffer::ProcessMessage( scoped_ptr<BlimpMessage> message, const net::CompletionCallback& callback) { - DVLOG(2) << "OutputBuffer::ProcessMessage " << message; + DVLOG(2) << "OutputBuffer::ProcessMessage " << message.get(); message->set_message_id(++prev_message_id_); diff --git a/blimp/net/browser_connection_handler.cc b/blimp/net/browser_connection_handler.cc index 78009cc..f4977f9 100644 --- a/blimp/net/browser_connection_handler.cc +++ b/blimp/net/browser_connection_handler.cc @@ -43,7 +43,7 @@ scoped_ptr<BlimpMessageProcessor> BrowserConnectionHandler::RegisterFeature( void BrowserConnectionHandler::HandleConnection( scoped_ptr<BlimpConnection> connection) { DCHECK(connection); - VLOG(1) << "HandleConnection " << connection; + VLOG(1) << "HandleConnection " << connection.get(); if (connection_) { DropCurrentConnection(); diff --git a/blimp/net/engine_authentication_handler.cc b/blimp/net/engine_authentication_handler.cc index fddfab3..cc6b047 100644 --- a/blimp/net/engine_authentication_handler.cc +++ b/blimp/net/engine_authentication_handler.cc @@ -106,7 +106,7 @@ void Authenticator::ProcessMessage(scoped_ptr<BlimpMessage> message, << message->protocol_control().start_connection().client_token(); OnConnectionAuthenticated(true); } else { - DVLOG(1) << "Expected START_CONNECTION message, got " << message + DVLOG(1) << "Expected START_CONNECTION message, got " << message.get() << " instead."; OnConnectionAuthenticated(false); } diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h index 7a9cd93..90090cf 100644 --- a/cc/animation/element_animations.h +++ b/cc/animation/element_animations.h @@ -58,10 +58,10 @@ class CC_EXPORT ElementAnimations : public AnimationDelegate, void LayerUnregistered(int layer_id, LayerTreeType tree_type); bool has_active_value_observer_for_testing() const { - return active_value_observer_; + return !!active_value_observer_; } bool has_pending_value_observer_for_testing() const { - return pending_value_observer_; + return !!pending_value_observer_; } void AddPlayer(AnimationPlayer* player); diff --git a/cc/input/top_controls_manager.h b/cc/input/top_controls_manager.h index 0ae1818..995577d 100644 --- a/cc/input/top_controls_manager.h +++ b/cc/input/top_controls_manager.h @@ -44,7 +44,7 @@ class CC_EXPORT TopControlsManager float TopControlsShownRatio() const; float TopControlsHeight() const; - bool has_animation() const { return top_controls_animation_; } + bool has_animation() const { return !!top_controls_animation_; } AnimationDirection animation_direction() { return animation_direction_; } void UpdateTopControlsState(TopControlsState constraints, diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index 48e9529..c9cfc3e 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -244,8 +244,8 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, const LayerImpl* replica_layer() const { return replica_layer_.get(); } scoped_ptr<LayerImpl> TakeReplicaLayer(); - bool has_mask() const { return mask_layer_; } - bool has_replica() const { return replica_layer_; } + bool has_mask() const { return !!mask_layer_; } + bool has_replica() const { return !!replica_layer_; } bool replica_has_mask() const { return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_); } diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc index 6e73dfa..5898c7a 100644 --- a/cc/trees/single_thread_proxy.cc +++ b/cc/trees/single_thread_proxy.cc @@ -98,7 +98,7 @@ void SingleThreadProxy::FinishAllRendering() { bool SingleThreadProxy::IsStarted() const { DCHECK(task_runner_provider_->IsMainThread()); - return layer_tree_host_impl_; + return !!layer_tree_host_impl_; } bool SingleThreadProxy::CommitToActiveTree() const { diff --git a/chrome/browser/certificate_manager_model.cc b/chrome/browser/certificate_manager_model.cc index b38b298..77f22c0 100644 --- a/chrome/browser/certificate_manager_model.cc +++ b/chrome/browser/certificate_manager_model.cc @@ -237,7 +237,7 @@ void CertificateManagerModel::DidGetCertDBOnIOThread( net::NSSCertDatabase* cert_db) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - bool is_user_db_available = cert_db->GetPublicSlot(); + bool is_user_db_available = !!cert_db->GetPublicSlot(); bool is_tpm_available = false; #if defined(OS_CHROMEOS) is_tpm_available = crypto::IsTPMTokenEnabledForNSS(); diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc index b997ee1..a656000 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc @@ -1063,7 +1063,7 @@ bool FileSystemChooseEntryFunction::RunAsync() { file_system::ChooseEntryOptions* options = params->options.get(); if (options) { - multiple_ = options->accepts_multiple; + multiple_ = !!options->accepts_multiple; if (multiple_) picker_type = ui::SelectFileDialog::SELECT_OPEN_MULTI_FILE; diff --git a/chrome/browser/extensions/api/gcd_private/privet_v3_session.cc b/chrome/browser/extensions/api/gcd_private/privet_v3_session.cc index e7f8fd1..6074cd8 100644 --- a/chrome/browser/extensions/api/gcd_private/privet_v3_session.cc +++ b/chrome/browser/extensions/api/gcd_private/privet_v3_session.cc @@ -159,7 +159,7 @@ void PrivetV3Session::FetcherDelegate::OnURLFetchComplete( } bool has_error = value->HasKey(kPrivetV3KeyError); - LOG_IF(ERROR, has_error) << "Response: " << value; + LOG_IF(ERROR, has_error) << "Response: " << value.get(); ReplyAndDestroyItself( has_error ? Result::STATUS_DEVICEERROR : Result::STATUS_SUCCESS, *value); } diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc index c88e10e..7ee73f4 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc @@ -332,11 +332,11 @@ void WebstorePrivateBeginInstallWithManifest3Function::HandleInstallProceed() { WebstoreInstaller::Approval::CreateWithNoInstallPrompt( chrome_details_.GetProfile(), details().id, std::move(parsed_manifest_), false)); - approval->use_app_installed_bubble = details().app_install_bubble; - approval->enable_launcher = details().enable_launcher; + approval->use_app_installed_bubble = !!details().app_install_bubble; + approval->enable_launcher = !!details().enable_launcher; // If we are enabling the launcher, we should not show the app list in order // to train the user to open it themselves at least once. - approval->skip_post_install_ui = details().enable_launcher; + approval->skip_post_install_ui = !!details().enable_launcher; approval->dummy_extension = dummy_extension_.get(); approval->installing_icon = gfx::ImageSkia::CreateFrom1xBitmap(icon_); if (details().authuser) diff --git a/chrome/browser/profile_resetter/brandcode_config_fetcher.h b/chrome/browser/profile_resetter/brandcode_config_fetcher.h index 93805ca..4308700 100644 --- a/chrome/browser/profile_resetter/brandcode_config_fetcher.h +++ b/chrome/browser/profile_resetter/brandcode_config_fetcher.h @@ -26,7 +26,7 @@ class BrandcodeConfigFetcher : public net::URLFetcherDelegate { const std::string& brandcode); ~BrandcodeConfigFetcher() override; - bool IsActive() const { return config_fetcher_; } + bool IsActive() const { return !!config_fetcher_; } scoped_ptr<BrandcodedDefaultSettings> GetSettings() { return std::move(default_settings_); diff --git a/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc b/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc index cac4538..4a449b1 100644 --- a/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc +++ b/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc @@ -139,9 +139,7 @@ class TestLockHandler : public proximity_auth::ScreenlockBridge::LockHandler { } // Whether the custom icon is set. - bool HasCustomIcon() const { - return last_custom_icon_; - } + bool HasCustomIcon() const { return !!last_custom_icon_; } // If custom icon is set, returns the icon's id. // If there is no icon, or if it doesn't have an id set, returns an empty diff --git a/chrome/browser/ssl/common_name_mismatch_handler.cc b/chrome/browser/ssl/common_name_mismatch_handler.cc index 691bb0e..6519a13 100644 --- a/chrome/browser/ssl/common_name_mismatch_handler.cc +++ b/chrome/browser/ssl/common_name_mismatch_handler.cc @@ -99,5 +99,5 @@ void CommonNameMismatchHandler::OnURLFetchComplete( } bool CommonNameMismatchHandler::IsCheckingSuggestedUrl() const { - return url_fetcher_; + return !!url_fetcher_; } diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_token.h b/chrome/browser/sync_file_system/drive_backend/sync_task_token.h index 1304ed6..d7596e2 100644 --- a/chrome/browser/sync_file_system/drive_backend/sync_task_token.h +++ b/chrome/browser/sync_file_system/drive_backend/sync_task_token.h @@ -63,7 +63,7 @@ class SyncTaskToken { void FinalizeTaskLog(const std::string& result_description); void RecordLog(const std::string& message); - bool has_task_log() const { return task_log_; } + bool has_task_log() const { return !!task_log_; } void SetTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log); scoped_ptr<TaskLogger::TaskLog> PassTaskLog(); diff --git a/chrome/browser/ui/extensions/extension_installed_bubble.h b/chrome/browser/ui/extensions/extension_installed_bubble.h index 780a723..e7f0305 100644 --- a/chrome/browser/ui/extensions/extension_installed_bubble.h +++ b/chrome/browser/ui/extensions/extension_installed_bubble.h @@ -74,7 +74,7 @@ class ExtensionInstalledBubble : public BubbleDelegate { const Browser* browser() const { return browser_; } const SkBitmap& icon() const { return icon_; } BubbleType type() const { return type_; } - bool has_command_keybinding() const { return action_command_; } + bool has_command_keybinding() const { return !!action_command_; } int options() const { return options_; } AnchorPosition anchor_position() const { return anchor_position_; } diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc index 1b46d33..322c6ee 100644 --- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc +++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc @@ -290,7 +290,7 @@ void ChromeOmniboxClient::OnResultChanged( const auto match = std::find_if( result.begin(), result.end(), - [](const AutocompleteMatch& current)->bool { return current.answer; }); + [](const AutocompleteMatch& current) { return !!current.answer; }); if (match != result.end()) { BitmapFetcherService* image_service = BitmapFetcherServiceFactory::GetForBrowserContext(profile_); diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc index 484e412..8e2787c 100644 --- a/components/autofill/core/browser/autofill_manager.cc +++ b/components/autofill/core/browser/autofill_manager.cc @@ -963,7 +963,7 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) { } } - DumpAutofillData(imported_credit_card); + DumpAutofillData(!!imported_credit_card); } #endif // ENABLE_FORM_DEBUG_DUMP diff --git a/components/drive/resource_metadata_storage.cc b/components/drive/resource_metadata_storage.cc index 92ff21f..14961ea 100644 --- a/components/drive/resource_metadata_storage.cc +++ b/components/drive/resource_metadata_storage.cc @@ -630,7 +630,7 @@ bool ResourceMetadataStorage::Initialize() { UMA_HISTOGRAM_ENUMERATION("Drive.MetadataDBInitResult", init_result, DB_INIT_MAX_VALUE); - return resource_map_; + return !!resource_map_; } void ResourceMetadataStorage::RecoverCacheInfoFromTrashedResourceMap( diff --git a/components/drive/service/fake_drive_service.cc b/components/drive/service/fake_drive_service.cc index 9943df2..3d2c30a 100644 --- a/components/drive/service/fake_drive_service.cc +++ b/components/drive/service/fake_drive_service.cc @@ -262,7 +262,7 @@ bool FakeDriveService::LoadAppListForDriveApi( CHECK_EQ(base::Value::TYPE_DICTIONARY, value->GetType()); app_info_value_.reset( static_cast<base::DictionaryValue*>(value.release())); - return app_info_value_; + return !!app_info_value_; } void FakeDriveService::AddApp(const std::string& app_id, diff --git a/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc b/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc index 4c837f9..cba3bf2 100644 --- a/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc +++ b/components/user_prefs/tracked/tracked_preferences_migration_unittest.cc @@ -293,9 +293,9 @@ class TrackedPreferencesMigrationTest : public testing::Test { bool HasPrefs(MockPrefStoreID store_id) { switch (store_id) { case MOCK_UNPROTECTED_PREF_STORE: - return unprotected_prefs_; + return !!unprotected_prefs_; case MOCK_PROTECTED_PREF_STORE: - return protected_prefs_; + return !!protected_prefs_; } NOTREACHED(); return false; diff --git a/content/browser/compositor/delegated_frame_host.h b/content/browser/compositor/delegated_frame_host.h index 21dc4e0..d1237af 100644 --- a/content/browser/compositor/delegated_frame_host.h +++ b/content/browser/compositor/delegated_frame_host.h @@ -155,7 +155,7 @@ class CONTENT_EXPORT DelegatedFrameHost void BeginFrameSubscription( scoped_ptr<RenderWidgetHostViewFrameSubscriber> subscriber); void EndFrameSubscription(); - bool HasFrameSubscriber() const { return frame_subscriber_; } + bool HasFrameSubscriber() const { return !!frame_subscriber_; } uint32_t GetSurfaceIdNamespace(); // Returns a null SurfaceId if this DelegatedFrameHost has not yet created // a compositor Surface. diff --git a/content/browser/media/media_web_contents_observer.h b/content/browser/media/media_web_contents_observer.h index 452349f..6752256 100644 --- a/content/browser/media/media_web_contents_observer.h +++ b/content/browser/media/media_web_contents_observer.h @@ -40,11 +40,11 @@ class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver { void WasHidden() override; bool has_audio_power_save_blocker_for_testing() const { - return audio_power_save_blocker_; + return !!audio_power_save_blocker_; } bool has_video_power_save_blocker_for_testing() const { - return video_power_save_blocker_; + return !!video_power_save_blocker_; } private: diff --git a/content/browser/renderer_host/input/touch_emulator.h b/content/browser/renderer_host/input/touch_emulator.h index d024945..c4fd18f 100644 --- a/content/browser/renderer_host/input/touch_emulator.h +++ b/content/browser/renderer_host/input/touch_emulator.h @@ -30,7 +30,7 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient { // Note that TouchEmulator should always listen to touch events and their acks // (even in disabled state) to track native stream presence. - bool enabled() const { return gesture_provider_; } + bool enabled() const { return !!gesture_provider_; } // Returns |true| if the event was consumed. Consumed event should not // propagate any further. diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc index 550b46b..a351dfd 100644 --- a/content/browser/renderer_host/input/touch_event_queue.cc +++ b/content/browser/renderer_host/input/touch_event_queue.cc @@ -695,7 +695,7 @@ bool TouchEventQueue::IsAckTimeoutEnabled() const { } bool TouchEventQueue::HasPendingAsyncTouchMoveForTesting() const { - return pending_async_touchmove_; + return !!pending_async_touchmove_; } bool TouchEventQueue::IsTimeoutRunningForTesting() const { diff --git a/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc b/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc index 791422d3..a5ffc01 100644 --- a/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc +++ b/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc @@ -45,7 +45,7 @@ bool TouchscreenTapSuppressionController::FilterTapEvent( return true; case WebInputEvent::GestureTapUnconfirmed: - return stashed_tap_down_; + return !!stashed_tap_down_; case WebInputEvent::GestureTapCancel: case WebInputEvent::GestureTap: diff --git a/content/browser/ssl/ssl_client_auth_handler.cc b/content/browser/ssl/ssl_client_auth_handler.cc index 3c1e42c..d0bc275 100644 --- a/content/browser/ssl/ssl_client_auth_handler.cc +++ b/content/browser/ssl/ssl_client_auth_handler.cc @@ -88,7 +88,7 @@ class SSLClientAuthHandler::Core : public base::RefCountedThreadSafe<Core> { client_cert_store_(std::move(client_cert_store)), cert_request_info_(cert_request_info) {} - bool has_client_cert_store() const { return client_cert_store_; } + bool has_client_cert_store() const { return !!client_cert_store_; } void GetClientCerts() { if (client_cert_store_) { diff --git a/content/browser/tracing/background_tracing_manager_impl.cc b/content/browser/tracing/background_tracing_manager_impl.cc index 250d0fa..44c2b34 100644 --- a/content/browser/tracing/background_tracing_manager_impl.cc +++ b/content/browser/tracing/background_tracing_manager_impl.cc @@ -188,7 +188,7 @@ bool BackgroundTracingManagerImpl::SetActiveScenario( } bool BackgroundTracingManagerImpl::HasActiveScenario() { - return config_; + return !!config_; } bool BackgroundTracingManagerImpl::IsTracingForTesting() { diff --git a/content/browser/wake_lock/wake_lock_service_context.cc b/content/browser/wake_lock/wake_lock_service_context.cc index a6da2103..a6904c2 100644 --- a/content/browser/wake_lock/wake_lock_service_context.cc +++ b/content/browser/wake_lock/wake_lock_service_context.cc @@ -56,7 +56,7 @@ void WakeLockServiceContext::CancelWakeLock(int render_process_id, } bool WakeLockServiceContext::HasWakeLockForTests() const { - return wake_lock_; + return !!wake_lock_; } void WakeLockServiceContext::CreateWakeLock() { diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc index 97dd750..4649e8c 100644 --- a/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc +++ b/content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc @@ -112,7 +112,7 @@ class OverscrollNavigationOverlayTest : public RenderViewHostImplTestHarness { // offset -1 on layer_delegate_. scoped_ptr<aura::Window> window( GetOverlay()->CreateBackWindow(GetBackSlideWindowBounds())); - bool window_created = window; + bool window_created = !!window; // Performs BACK navigation, sets image from layer_delegate_ on // image_delegate_. GetOverlay()->OnOverscrollCompleting(); diff --git a/crypto/scoped_test_nss_db.h b/crypto/scoped_test_nss_db.h index a305b7f..c01653f 100644 --- a/crypto/scoped_test_nss_db.h +++ b/crypto/scoped_test_nss_db.h @@ -20,7 +20,7 @@ class CRYPTO_EXPORT ScopedTestNSSDB { ScopedTestNSSDB(); ~ScopedTestNSSDB(); - bool is_open() const { return slot_; } + bool is_open() const { return !!slot_; } PK11SlotInfo* slot() const { return slot_.get(); } private: diff --git a/extensions/browser/api/storage/storage_api_unittest.cc b/extensions/browser/api/storage/storage_api_unittest.cc index f09fa91..f987db2 100644 --- a/extensions/browser/api/storage/storage_api_unittest.cc +++ b/extensions/browser/api/storage/storage_api_unittest.cc @@ -67,7 +67,8 @@ class StorageApiUnittest : public ApiUnitTest { return testing::AssertionFailure() << "No result"; base::DictionaryValue* dict = NULL; if (!result->GetAsDictionary(&dict)) - return testing::AssertionFailure() << result << " was not a dictionary."; + return testing::AssertionFailure() << result.get() + << " was not a dictionary."; if (!dict->GetString(key, value)) { return testing::AssertionFailure() << " could not retrieve a string from" << dict << " at " << key; diff --git a/media/audio/sounds/audio_stream_handler.cc b/media/audio/sounds/audio_stream_handler.cc index 62235c9..56d1b94 100644 --- a/media/audio/sounds/audio_stream_handler.cc +++ b/media/audio/sounds/audio_stream_handler.cc @@ -204,7 +204,7 @@ AudioStreamHandler::~AudioStreamHandler() { bool AudioStreamHandler::IsInitialized() const { DCHECK(CalledOnValidThread()); - return stream_; + return !!stream_; } bool AudioStreamHandler::Play() { diff --git a/media/base/bind_to_current_loop_unittest.cc b/media/base/bind_to_current_loop_unittest.cc index 7fb56d4..abb3081 100644 --- a/media/base/bind_to_current_loop_unittest.cc +++ b/media/base/bind_to_current_loop_unittest.cc @@ -23,7 +23,7 @@ void BoundBoolSetFromScopedPtr(bool* var, scoped_ptr<bool> val) { void BoundBoolSetFromScopedPtrFreeDeleter( bool* var, scoped_ptr<bool, base::FreeDeleter> val) { - *var = val; + *var = *val; } void BoundBoolSetFromScopedArray(bool* var, scoped_ptr<bool[]> val) { diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc index 867d630..a548b64 100644 --- a/media/base/pipeline.cc +++ b/media/base/pipeline.cc @@ -821,7 +821,7 @@ void Pipeline::OnAddTextTrack(const TextTrackConfig& config, void Pipeline::InitializeDemuxer(const PipelineStatusCB& done_cb) { DCHECK(task_runner_->BelongsToCurrentThread()); - demuxer_->Initialize(this, done_cb, text_renderer_); + demuxer_->Initialize(this, done_cb, !!text_renderer_); } void Pipeline::InitializeRenderer(const PipelineStatusCB& done_cb) { diff --git a/media/blink/buffered_resource_loader_unittest.cc b/media/blink/buffered_resource_loader_unittest.cc index 3065291..4c74611 100644 --- a/media/blink/buffered_resource_loader_unittest.cc +++ b/media/blink/buffered_resource_loader_unittest.cc @@ -292,7 +292,7 @@ class BufferedResourceLoaderTest : public testing::Test { EXPECT_LE(loader_->buffer_.backward_capacity(), kMaxBufferCapacity); } - bool HasActiveLoader() { return loader_->active_loader_; } + bool HasActiveLoader() { return !!loader_->active_loader_; } MOCK_METHOD1(StartCallback, void(BufferedResourceLoader::Status)); MOCK_METHOD2(ReadCallback, void(BufferedResourceLoader::Status, int)); diff --git a/media/filters/decoder_stream.cc b/media/filters/decoder_stream.cc index 52f9458..8490b23 100644 --- a/media/filters/decoder_stream.cc +++ b/media/filters/decoder_stream.cc @@ -274,7 +274,7 @@ void DecoderStream<StreamType>::OnDecoderSelected( } media_log_->SetBooleanProperty(GetStreamTypeString() + "_dds", - decrypting_demuxer_stream_); + !!decrypting_demuxer_stream_); media_log_->SetStringProperty(GetStreamTypeString() + "_decoder", decoder_->GetDisplayName()); diff --git a/net/cert/ct_objects_extractor_openssl.cc b/net/cert/ct_objects_extractor_openssl.cc index 6fcc3b8..7c878d3 100644 --- a/net/cert/ct_objects_extractor_openssl.cc +++ b/net/cert/ct_objects_extractor_openssl.cc @@ -232,7 +232,7 @@ bool GetPrecertLogEntry(X509Certificate::OSCertHandle leaf, // Extract the issuer's public key. std::string issuer_der; if (!X509Certificate::GetDEREncoded(issuer, &issuer_der)) - return ScopedX509(); + return false; base::StringPiece issuer_key; if (!asn1::ExtractSPKIFromDERCert(issuer_der, &issuer_key)) return false; diff --git a/net/cert/internal/signature_algorithm_unittest.cc b/net/cert/internal/signature_algorithm_unittest.cc index 32f5a0f..0336c57 100644 --- a/net/cert/internal/signature_algorithm_unittest.cc +++ b/net/cert/internal/signature_algorithm_unittest.cc @@ -21,7 +21,7 @@ namespace { template <size_t N> bool ParseDer(const uint8_t(&data)[N], scoped_ptr<SignatureAlgorithm>* out) { *out = SignatureAlgorithm::CreateFromDer(der::Input(data, N)); - return *out; + return !!*out; } // Parses a SignatureAlgorithm given an empty DER input. diff --git a/net/server/web_socket_encoder.h b/net/server/web_socket_encoder.h index 1e9206f..caeec94 100644 --- a/net/server/web_socket_encoder.h +++ b/net/server/web_socket_encoder.h @@ -42,7 +42,7 @@ class WebSocketEncoder final { int masking_key, std::string* output); - bool deflate_enabled() const { return deflater_; } + bool deflate_enabled() const { return !!deflater_; } private: enum Type { diff --git a/net/test/cert_test_util_nss.cc b/net/test/cert_test_util_nss.cc index 4cd435b..b171fe9 100644 --- a/net/test/cert_test_util_nss.cc +++ b/net/test/cert_test_util_nss.cc @@ -37,7 +37,7 @@ bool ImportSensitiveKeyFromFile(const base::FilePath& dir, true /* permanent */)); LOG_IF(ERROR, !private_key) << "Could not create key from file " << key_path.value(); - return private_key; + return !!private_key; } bool ImportClientCertToSlot(const scoped_refptr<X509Certificate>& cert, diff --git a/ppapi/proxy/compositor_layer_resource.cc b/ppapi/proxy/compositor_layer_resource.cc index fc88f6a..838a513 100644 --- a/ppapi/proxy/compositor_layer_resource.cc +++ b/ppapi/proxy/compositor_layer_resource.cc @@ -344,19 +344,19 @@ bool CompositorLayerResource::SetType(LayerType type) { if (type == TYPE_COLOR) { if (data_.is_null()) data_.color.reset(new CompositorLayerData::ColorLayer()); - return data_.color; + return !!data_.color; } if (type == TYPE_TEXTURE) { if (data_.is_null()) data_.texture.reset(new CompositorLayerData::TextureLayer()); - return data_.texture; + return !!data_.texture; } if (type == TYPE_IMAGE) { if (data_.is_null()) data_.image.reset(new CompositorLayerData::ImageLayer()); - return data_.image; + return !!data_.image; } // Should not be reached. diff --git a/ppapi/proxy/raw_var_data.cc b/ppapi/proxy/raw_var_data.cc index 6e4e057..bb67dc0 100644 --- a/ppapi/proxy/raw_var_data.cc +++ b/ppapi/proxy/raw_var_data.cc @@ -717,7 +717,7 @@ void ResourceRawVarData::Write(IPC::Message* m, m->WriteInt(static_cast<int>(pp_resource_)); m->WriteInt(pending_renderer_host_id_); m->WriteInt(pending_browser_host_id_); - m->WriteBool(creation_message_); + m->WriteBool(!!creation_message_); if (creation_message_) IPC::WriteParam(m, *creation_message_); } diff --git a/remoting/host/backoff_timer.h b/remoting/host/backoff_timer.h index edd49a5..a75a8d3 100644 --- a/remoting/host/backoff_timer.h +++ b/remoting/host/backoff_timer.h @@ -31,7 +31,7 @@ class BackoffTimer { void Stop(); // Returns true if the user task may be invoked in the future. - bool IsRunning() const { return backoff_entry_; } + bool IsRunning() const { return !!backoff_entry_; } void SetTimerForTest(scoped_ptr<base::Timer> timer); diff --git a/remoting/host/gcd_rest_client.h b/remoting/host/gcd_rest_client.h index 23263f2..40c6d0b 100644 --- a/remoting/host/gcd_rest_client.h +++ b/remoting/host/gcd_rest_client.h @@ -45,7 +45,7 @@ class GcdRestClient : public net::URLFetcherDelegate { // Tests whether is object is currently running a request. Only one // request at a time may be pending. - bool HasPendingRequest() { return url_fetcher_; } + bool HasPendingRequest() { return !!url_fetcher_; } // Sends a 'patchState' request to the GCD API. Constructs and // sends an appropriate JSON message M where |patch_details| becomes diff --git a/remoting/host/native_messaging/native_messaging_reader.cc b/remoting/host/native_messaging/native_messaging_reader.cc index ffb553e..f5cbb87 100644 --- a/remoting/host/native_messaging/native_messaging_reader.cc +++ b/remoting/host/native_messaging/native_messaging_reader.cc @@ -115,7 +115,7 @@ void NativeMessagingReader::Core::ReadMessage() { scoped_ptr<base::Value> message = base::JSONReader::Read(message_json); if (!message) { - LOG(ERROR) << "Failed to parse JSON message: " << message; + LOG(ERROR) << "Failed to parse JSON message: " << message.get(); NotifyEof(); return; } diff --git a/remoting/host/setup/me2me_native_messaging_host.cc b/remoting/host/setup/me2me_native_messaging_host.cc index 59ceadc..5070735 100644 --- a/remoting/host/setup/me2me_native_messaging_host.cc +++ b/remoting/host/setup/me2me_native_messaging_host.cc @@ -261,13 +261,13 @@ void Me2MeNativeMessagingHost::ProcessGetPinHash( std::string host_id; if (!message->GetString("hostId", &host_id)) { - LOG(ERROR) << "'hostId' not found: " << message; + LOG(ERROR) << "'hostId' not found: " << message.get(); OnError(); return; } std::string pin; if (!message->GetString("pin", &pin)) { - LOG(ERROR) << "'pin' not found: " << message; + LOG(ERROR) << "'pin' not found: " << message.get(); OnError(); return; } diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc index e8fc008..6df7afd 100644 --- a/storage/browser/blob/blob_storage_context.cc +++ b/storage/browser/blob/blob_storage_context.cc @@ -60,7 +60,7 @@ BlobStorageContext::BlobMapEntry::~BlobMapEntry() { } bool BlobStorageContext::BlobMapEntry::IsBeingBuilt() { - return data_builder; + return !!data_builder; } BlobStorageContext::BlobStorageContext() : memory_usage_(0) { diff --git a/sync/engine/non_blocking_type_commit_contribution.cc b/sync/engine/non_blocking_type_commit_contribution.cc index 5216ed0..d4506b3 100644 --- a/sync/engine/non_blocking_type_commit_contribution.cc +++ b/sync/engine/non_blocking_type_commit_contribution.cc @@ -62,13 +62,13 @@ syncer::SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse( case sync_pb::CommitResponse::INVALID_MESSAGE: LOG(ERROR) << "Server reports commit message is invalid."; DLOG(ERROR) << "Message was: " - << syncer::SyncEntityToValue(entities_.Get(i), false); + << syncer::SyncEntityToValue(entities_.Get(i), false).get(); unknown_error = true; break; case sync_pb::CommitResponse::CONFLICT: DVLOG(1) << "Server reports conflict for commit message."; DVLOG(1) << "Message was: " - << syncer::SyncEntityToValue(entities_.Get(i), false); + << syncer::SyncEntityToValue(entities_.Get(i), false).get(); commit_conflict = true; break; case sync_pb::CommitResponse::SUCCESS: { diff --git a/sync/internal_api/public/util/proto_value_ptr_unittest.cc b/sync/internal_api/public/util/proto_value_ptr_unittest.cc index f439825..1420980 100644 --- a/sync/internal_api/public/util/proto_value_ptr_unittest.cc +++ b/sync/internal_api/public/util/proto_value_ptr_unittest.cc @@ -45,7 +45,7 @@ class TestValue { int value() const { return value_->value(); } IntValue* value_ptr() const { return value_.get(); } - bool is_initialized() const { return value_; } + bool is_initialized() const { return !!value_; } bool is_default() const { return is_default_; } // TestValue uses the default traits struct with ProtoValuePtr<TestValue>. diff --git a/sync/sessions/data_type_tracker.cc b/sync/sessions/data_type_tracker.cc index 63cf523..4a8d8d0 100644 --- a/sync/sessions/data_type_tracker.cc +++ b/sync/sessions/data_type_tracker.cc @@ -202,7 +202,7 @@ void DataTypeTracker::FillGetUpdatesTriggersMessage( msg->set_server_dropped_hints( !pending_invalidations_.empty() && (*pending_invalidations_.begin())->IsUnknownVersion()); - msg->set_client_dropped_hints(last_dropped_invalidation_); + msg->set_client_dropped_hints(!!last_dropped_invalidation_); msg->set_local_modification_nudges(local_nudge_count_); msg->set_datatype_refresh_nudges(local_refresh_request_count_); msg->set_initial_sync_in_progress(initial_sync_required_); diff --git a/ui/app_list/views/search_result_list_view_unittest.cc b/ui/app_list/views/search_result_list_view_unittest.cc index 4ad3458..bc9c0cd 100644 --- a/ui/app_list/views/search_result_list_view_unittest.cc +++ b/ui/app_list/views/search_result_list_view_unittest.cc @@ -100,9 +100,7 @@ class SearchResultListViewTest : public views::ViewsTestBase, return view_->OnKeyPressed(event); } - bool IsAutoLaunching() { - return view_->auto_launch_animation_; - } + bool IsAutoLaunching() { return !!view_->auto_launch_animation_; } void ForceAutoLaunch() { view_->ForceAutoLaunchForTest(); diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc index 8511af6..f635671 100644 --- a/ui/events/blink/input_handler_proxy.cc +++ b/ui/events/blink/input_handler_proxy.cc @@ -998,7 +998,7 @@ bool InputHandlerProxy::CancelCurrentFling() { } bool InputHandlerProxy::CancelCurrentFlingWithoutNotifyingClient() { - bool had_fling_animation = fling_curve_; + bool had_fling_animation = !!fling_curve_; if (had_fling_animation && fling_parameters_.sourceDevice == blink::WebGestureDeviceTouchscreen) { cc::ScrollState scroll_state(0, 0, fling_parameters_.point.x, diff --git a/ui/keyboard/content/keyboard_ui_content.cc b/ui/keyboard/content/keyboard_ui_content.cc index f117e78..7f97525 100644 --- a/ui/keyboard/content/keyboard_ui_content.cc +++ b/ui/keyboard/content/keyboard_ui_content.cc @@ -201,7 +201,7 @@ aura::Window* KeyboardUIContent::GetKeyboardWindow() { } bool KeyboardUIContent::HasKeyboardWindow() const { - return keyboard_contents_; + return !!keyboard_contents_; } bool KeyboardUIContent::ShouldWindowOverscroll(aura::Window* window) const { diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc index ddcf2e0..4e048a9 100644 --- a/ui/keyboard/keyboard_controller_unittest.cc +++ b/ui/keyboard/keyboard_controller_unittest.cc @@ -96,7 +96,7 @@ class TestKeyboardUI : public KeyboardUI { } // Overridden from KeyboardUI: - bool HasKeyboardWindow() const override { return window_; } + bool HasKeyboardWindow() const override { return !!window_; } bool ShouldWindowOverscroll(aura::Window* window) const override { return true; } diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc index fa957ef..22512ea9 100644 --- a/ui/views/controls/combobox/combobox.cc +++ b/ui/views/controls/combobox/combobox.cc @@ -528,7 +528,7 @@ bool Combobox::SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) { e.IsShiftDown() || e.IsControlDown() || e.IsAltDown()) { return false; } - return menu_runner_; + return !!menu_runner_; } bool Combobox::OnKeyPressed(const ui::KeyEvent& e) { diff --git a/ui/views/controls/native/native_view_host_aura.cc b/ui/views/controls/native/native_view_host_aura.cc index 2a7d914..6bf4ce8 100644 --- a/ui/views/controls/native/native_view_host_aura.cc +++ b/ui/views/controls/native/native_view_host_aura.cc @@ -138,7 +138,7 @@ void NativeViewHostAura::InstallClip(int x, int y, int w, int h) { } bool NativeViewHostAura::HasInstalledClip() { - return clip_rect_; + return !!clip_rect_; } void NativeViewHostAura::UninstallClip() { |
