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

Unified Diff: chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc

Issue 16472007: Rename StorageMonitor Initialize function to EnsureInitialized for better understanding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 7 years, 6 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/extensions/api/media_galleries_private/media_galleries_private_api.cc
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
index fa1246bcb90170e3302e17021a3364ceeb98ec97..86a414aaf5727a4f40414ec0976d5f33fd69bfbb 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.cc
@@ -128,7 +128,7 @@ void MediaGalleriesPrivateAPI::OnListenerAdded(
// This method is called synchronously with the message handler for the
// JS invocation.
- chrome::StorageMonitor::GetInstance()->Initialize(base::Bind(
+ chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
&MediaGalleriesPrivateAPI::MaybeInitializeEventRouterAndTracker,
weak_ptr_factory_.GetWeakPtr()));
}
@@ -171,7 +171,7 @@ bool MediaGalleriesPrivateAddGalleryWatchFunction::RunImpl() {
AddGalleryWatch::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
- chrome::StorageMonitor::GetInstance()->Initialize(base::Bind(
+ chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
&MediaGalleriesPrivateAddGalleryWatchFunction::OnStorageMonitorInit,
this,
params->gallery_id));
@@ -251,7 +251,7 @@ bool MediaGalleriesPrivateRemoveGalleryWatchFunction::RunImpl() {
RemoveGalleryWatch::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
- chrome::StorageMonitor::GetInstance()->Initialize(base::Bind(
+ chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
&MediaGalleriesPrivateRemoveGalleryWatchFunction::OnStorageMonitorInit,
this,
params->gallery_id));
@@ -298,7 +298,7 @@ bool MediaGalleriesPrivateGetAllGalleryWatchFunction::RunImpl() {
if (!render_view_host() || !render_view_host()->GetProcess())
return false;
- chrome::StorageMonitor::GetInstance()->Initialize(base::Bind(
+ chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
&MediaGalleriesPrivateGetAllGalleryWatchFunction::OnStorageMonitorInit,
this));
return true;
@@ -335,7 +335,7 @@ bool MediaGalleriesPrivateRemoveAllGalleryWatchFunction::RunImpl() {
if (!render_view_host() || !render_view_host()->GetProcess())
return false;
- chrome::StorageMonitor::GetInstance()->Initialize(base::Bind(
+ chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
&MediaGalleriesPrivateRemoveAllGalleryWatchFunction::OnStorageMonitorInit,
this));
return true;
@@ -371,7 +371,7 @@ bool MediaGalleriesPrivateEjectDeviceFunction::RunImpl() {
scoped_ptr<EjectDevice::Params> params(EjectDevice::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
- chrome::StorageMonitor::GetInstance()->Initialize(base::Bind(
+ chrome::StorageMonitor::GetInstance()->EnsureInitialized(base::Bind(
&MediaGalleriesPrivateEjectDeviceFunction::OnStorageMonitorInit,
this,
params->device_id));

Powered by Google App Engine
This is Rietveld 408576698