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

Unified Diff: chrome/browser/chromeos/customization/customization_document.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: chrome/browser/chromeos/customization/customization_document.h
diff --git a/chrome/browser/chromeos/customization/customization_document.h b/chrome/browser/chromeos/customization/customization_document.h
index 688cf23f93cbef7dd409b202a8aa8f0c6eef8d1f..a9712065e438563b52cc62e8fe0ea9ac085133ea 100644
--- a/chrome/browser/chromeos/customization/customization_document.h
+++ b/chrome/browser/chromeos/customization/customization_document.h
@@ -7,13 +7,13 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include <vector>
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
@@ -69,7 +69,7 @@ class CustomizationDocument {
const std::string& dictionary_name,
const std::string& entry_name) const;
- scoped_ptr<base::DictionaryValue> root_;
+ std::unique_ptr<base::DictionaryValue> root_;
// Value of the "version" attribute that is supported.
// Otherwise config is not loaded.
@@ -174,7 +174,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
bool GetDefaultWallpaperUrl(GURL* out_url) const;
// Returns list of default apps.
- scoped_ptr<base::DictionaryValue> GetDefaultApps() const;
+ std::unique_ptr<base::DictionaryValue> GetDefaultApps() const;
// Creates an extensions::ExternalLoader that will provide OEM default apps.
// Cache of OEM default apps stored in profile preferences.
@@ -248,7 +248,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
void OnManifestLoaded();
// Returns list of default apps in ExternalProvider format.
- static scoped_ptr<base::DictionaryValue> GetDefaultAppsInProviderFormat(
+ static std::unique_ptr<base::DictionaryValue> GetDefaultAppsInProviderFormat(
const base::DictionaryValue& root);
// Update cached manifest for |profile|.
@@ -267,7 +267,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
// Start download of wallpaper image if needed.
void StartOEMWallpaperDownload(const GURL& wallpaper_url,
- scoped_ptr<ApplyingTask> applying);
+ std::unique_ptr<ApplyingTask> applying);
// Check that current customized wallpaper cache exists. Once wallpaper is
// downloaded, it's never updated (even if manifest is re-fetched).
@@ -275,17 +275,17 @@ class ServicesCustomizationDocument : public CustomizationDocument,
void CheckAndApplyWallpaper();
// Intermediate function to pass the result of PathExists to ApplyWallpaper.
- void OnCheckedWallpaperCacheExists(scoped_ptr<bool> exists,
- scoped_ptr<ApplyingTask> applying);
+ void OnCheckedWallpaperCacheExists(std::unique_ptr<bool> exists,
+ std::unique_ptr<ApplyingTask> applying);
// Called after downloaded wallpaper has been checked.
void ApplyWallpaper(bool default_wallpaper_file_exists,
- scoped_ptr<ApplyingTask> applying);
+ std::unique_ptr<ApplyingTask> applying);
// Set Shell default wallpaper to customized.
// It's wrapped as a callback and passed as a parameter to
// CustomizationWallpaperDownloader.
- void OnOEMWallpaperDownloaded(scoped_ptr<ApplyingTask> applying,
+ void OnOEMWallpaperDownloaded(std::unique_ptr<ApplyingTask> applying,
bool success,
const GURL& wallpaper_url);
@@ -299,7 +299,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
GURL url_;
// URLFetcher instance.
- scoped_ptr<net::URLFetcher> url_fetcher_;
+ std::unique_ptr<net::URLFetcher> url_fetcher_;
// How many times we already tried to fetch customization manifest file.
int num_retries_;
@@ -313,7 +313,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
// Known external loaders.
ExternalLoaders external_loaders_;
- scoped_ptr<CustomizationWallpaperDownloader> wallpaper_downloader_;
+ std::unique_ptr<CustomizationWallpaperDownloader> wallpaper_downloader_;
// This is barrier until customization is applied.
// When number of finished tasks match number of started - customization is
« no previous file with comments | « chrome/browser/chromeos/chrome_interface_factory.h ('k') | chrome/browser/chromeos/customization/customization_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698