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

Unified Diff: chrome/common/cloud_print/cloud_print_helpers.cc

Issue 1880143002: Convert chrome/common to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/cloud_print/cloud_print_helpers.h ('k') | chrome/common/component_flash_hint_file_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/cloud_print/cloud_print_helpers.cc
diff --git a/chrome/common/cloud_print/cloud_print_helpers.cc b/chrome/common/cloud_print/cloud_print_helpers.cc
index a5a450ed102427e2e1328a17de72850195e7eda0..9a2a00a431fd3b74e51f1dbd55a6ba9affc399f2 100644
--- a/chrome/common/cloud_print/cloud_print_helpers.cc
+++ b/chrome/common/cloud_print/cloud_print_helpers.cc
@@ -7,11 +7,11 @@
#include <stdint.h>
#include <limits>
+#include <memory>
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/md5.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "base/values.h"
@@ -184,17 +184,18 @@ GURL GetUrlForGetAuthCode(const GURL& cloud_print_server_url,
return cloud_print_server_url.ReplaceComponents(replacements);
}
-scoped_ptr<base::DictionaryValue> ParseResponseJSON(
+std::unique_ptr<base::DictionaryValue> ParseResponseJSON(
const std::string& response_data,
bool* succeeded) {
- scoped_ptr<base::Value> message_value(base::JSONReader::Read(response_data));
+ std::unique_ptr<base::Value> message_value(
+ base::JSONReader::Read(response_data));
if (!message_value.get())
- return scoped_ptr<base::DictionaryValue>();
+ return std::unique_ptr<base::DictionaryValue>();
if (!message_value->IsType(base::Value::TYPE_DICTIONARY))
- return scoped_ptr<base::DictionaryValue>();
+ return std::unique_ptr<base::DictionaryValue>();
- scoped_ptr<base::DictionaryValue> response_dict(
+ std::unique_ptr<base::DictionaryValue> response_dict(
static_cast<base::DictionaryValue*>(message_value.release()));
if (succeeded &&
!response_dict->GetBoolean(kSuccessValue, succeeded))
« no previous file with comments | « chrome/common/cloud_print/cloud_print_helpers.h ('k') | chrome/common/component_flash_hint_file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698