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

Unified Diff: components/policy/core/common/remote_commands/remote_commands_service.cc

Issue 1134133005: Fix occasional crash in remote commands code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 5 years, 7 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
Index: components/policy/core/common/remote_commands/remote_commands_service.cc
diff --git a/components/policy/core/common/remote_commands/remote_commands_service.cc b/components/policy/core/common/remote_commands/remote_commands_service.cc
index d7b53bc693ccd0781e1be23d035ede2b0f17ec5e..4541f655dd2535ed2e00605a4d5cc834eb34b559 100644
--- a/components/policy/core/common/remote_commands/remote_commands_service.cc
+++ b/components/policy/core/common/remote_commands/remote_commands_service.cc
@@ -22,6 +22,7 @@ RemoteCommandsService::RemoteCommandsService(
scoped_ptr<RemoteCommandsFactory> factory,
CloudPolicyClient* client)
: factory_(factory.Pass()), client_(client), weak_factory_(this) {
+ DCHECK(client_);
queue_.AddObserver(this);
}
@@ -30,7 +31,7 @@ RemoteCommandsService::~RemoteCommandsService() {
}
bool RemoteCommandsService::FetchRemoteCommands() {
- if (!client_ || !client_->is_registered())
+ if (!client_->is_registered())
return false;
if (command_fetch_in_progress_) {

Powered by Google App Engine
This is Rietveld 408576698