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

Unified Diff: extensions/browser/content_hash_fetcher.cc

Issue 1909773002: Convert //extensions/browser from scoped_ptr 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 | « extensions/browser/computed_hashes.cc ('k') | extensions/browser/content_hash_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_hash_fetcher.cc
diff --git a/extensions/browser/content_hash_fetcher.cc b/extensions/browser/content_hash_fetcher.cc
index 883f44ff94f619d7a5234a69411d7d9065f8e7d1..678cf5f659c6cbc076ab473b919f0e3badf44331 100644
--- a/extensions/browser/content_hash_fetcher.cc
+++ b/extensions/browser/content_hash_fetcher.cc
@@ -139,14 +139,14 @@ class ContentHashFetcherJob
content::BrowserThread::ID creation_thread_;
// Used for fetching content signatures.
- scoped_ptr<net::URLFetcher> url_fetcher_;
+ std::unique_ptr<net::URLFetcher> url_fetcher_;
// The key used to validate verified_contents.json.
ContentVerifierKey key_;
// The parsed contents of the verified_contents.json file, either read from
// disk or fetched from the network and then written to disk.
- scoped_ptr<VerifiedContents> verified_contents_;
+ std::unique_ptr<VerifiedContents> verified_contents_;
// Whether this job succeeded.
bool success_;
@@ -256,7 +256,7 @@ void ContentHashFetcherJob::DoneCheckingForVerifiedContents(bool found) {
// contents to be written into a file. Also ensures that the directory for
// |path| exists, creating it if needed.
static int WriteFileHelper(const base::FilePath& path,
- scoped_ptr<std::string> content) {
+ std::unique_ptr<std::string> content) {
base::FilePath dir = path.DirName();
return (base::CreateDirectoryAndGetError(dir, NULL) &&
base::WriteFile(path, content->data(), content->size()));
@@ -268,7 +268,7 @@ void ContentHashFetcherJob::OnURLFetchComplete(const net::URLFetcher* source) {
<< fetch_url_.possibly_invalid_spec();
if (IsCancelled())
return;
- scoped_ptr<std::string> response(new std::string);
+ std::unique_ptr<std::string> response(new std::string);
if (!url_fetcher_->GetStatus().is_success() ||
!url_fetcher_->GetResponseAsString(response.get())) {
DoneFetchingVerifiedContents(false);
@@ -279,7 +279,7 @@ void ContentHashFetcherJob::OnURLFetchComplete(const net::URLFetcher* source) {
// can be a login redirect html, xml file, etc. if you aren't logged in with
// the right cookies). TODO(asargent) - It would be a nice enhancement to
// move to parsing this in a sandboxed helper (crbug.com/372878).
- scoped_ptr<base::Value> parsed(base::JSONReader::Read(*response));
+ std::unique_ptr<base::Value> parsed(base::JSONReader::Read(*response));
if (parsed) {
VLOG(1) << "JSON parsed ok for " << extension_id_;
« no previous file with comments | « extensions/browser/computed_hashes.cc ('k') | extensions/browser/content_hash_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698