diff options
author | xiaomings@google.com <xiaomings@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-28 20:19:51 +0000 |
---|---|---|
committer | xiaomings@google.com <xiaomings@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-28 20:19:51 +0000 |
commit | c51f2c7f2b44efd65df1418902cc5fa5e0a89951 (patch) | |
tree | 757d1a8a5275f26375762c471ecd442a003ab8b9 /chrome/service | |
parent | f0a4ed6188827c1030b3bb3f085c4b8144f15f71 (diff) | |
download | chromium_src-c51f2c7f2b44efd65df1418902cc5fa5e0a89951.zip chromium_src-c51f2c7f2b44efd65df1418902cc5fa5e0a89951.tar.gz chromium_src-c51f2c7f2b44efd65df1418902cc5fa5e0a89951.tar.bz2 |
Add WARN_UNUSED_RESULT to scoped_refptr::release.
Also fixed some possible leaks related by scoped_refptr::release.
See https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/b5thcBgubsM
BUG=
Review URL: https://chromiumcodereview.appspot.com/10874054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r-- | chrome/service/cloud_print/cloud_print_connector.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc index 4187ab0..9d8fc351 100644 --- a/chrome/service/cloud_print/cloud_print_connector.cc +++ b/chrome/service/cloud_print/cloud_print_connector.cc @@ -54,7 +54,7 @@ bool CloudPrintConnector::InitPrintSystem() { } cloud_print::PrintSystem::PrintSystemResult result = print_system_->Init(); if (!result.succeeded()) { - print_system_.release(); + print_system_ = NULL; // We could not initialize the print system. We need to notify the server. ReportUserMessage(kPrintSystemFailedMessageId, result.message()); return false; @@ -86,7 +86,7 @@ void CloudPrintConnector::Stop() { DCHECK(IsRunning()); // Do uninitialization here. pending_tasks_.clear(); - print_server_watcher_.release(); + print_server_watcher_ = NULL; request_ = NULL; } @@ -588,4 +588,3 @@ bool CloudPrintConnector::IsSamePrinter(const std::string& name1, const std::string& name2) const { return (0 == base::strcasecmp(name1.c_str(), name2.c_str())); } - |