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

Unified Diff: content/renderer/mojo_context_state.cc

Issue 1873783003: Convert //content/renderer 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 | « content/renderer/mojo_context_state.h ('k') | content/renderer/mus/compositor_mus_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/mojo_context_state.cc
diff --git a/content/renderer/mojo_context_state.cc b/content/renderer/mojo_context_state.cc
index 4274fee2060edb1700b39c7eea7142b27549c2ed..17939f7b8e0ae84b3b429a26e26b78b3290da73f 100644
--- a/content/renderer/mojo_context_state.cc
+++ b/content/renderer/mojo_context_state.cc
@@ -52,7 +52,7 @@ void RunMain(base::WeakPtr<gin::Runner> runner,
using ModuleSourceMap =
std::map<std::string, scoped_refptr<base::RefCountedMemory>>;
-base::LazyInstance<scoped_ptr<ModuleSourceMap>>::Leaky g_module_sources;
+base::LazyInstance<std::unique_ptr<ModuleSourceMap>>::Leaky g_module_sources;
scoped_refptr<base::RefCountedMemory> GetBuiltinModuleData(
const std::string& path) {
@@ -70,7 +70,7 @@ scoped_refptr<base::RefCountedMemory> GetBuiltinModuleData(
{ mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS },
};
- scoped_ptr<ModuleSourceMap>& module_sources = g_module_sources.Get();
+ std::unique_ptr<ModuleSourceMap>& module_sources = g_module_sources.Get();
if (!module_sources) {
// Initialize the module source map on first access.
module_sources.reset(new ModuleSourceMap);
@@ -186,7 +186,7 @@ void MojoContextState::OnFetchModuleComplete(
DCHECK_EQ(module_prefix_ + id, response.url().string().utf8());
// We can't delete fetch right now as the arguments to this function come from
// it and are used below. Instead use a scope_ptr to cleanup.
- scoped_ptr<ResourceFetcher> deleter(fetcher);
+ std::unique_ptr<ResourceFetcher> deleter(fetcher);
module_fetchers_.weak_erase(
std::find(module_fetchers_.begin(), module_fetchers_.end(), fetcher));
if (data.empty()) {
« no previous file with comments | « content/renderer/mojo_context_state.h ('k') | content/renderer/mus/compositor_mus_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698