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

Unified Diff: chrome/browser/ui/webui/options/media_galleries_handler.h

Issue 14556015: [Media Galleries] Lazily initialize the storage monitor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix merge Created 7 years, 7 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/ui/webui/options/media_galleries_handler.h
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.h b/chrome/browser/ui/webui/options/media_galleries_handler.h
index 441e7364ffafdd3507c013b7a3d72d0f6dfe0970..94debcc2f5367e4ad1c639e6bd4617393b419d2e 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.h
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_MEDIA_GALLERIES_HANDLER_H_
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "content/public/browser/notification_observer.h"
@@ -40,10 +41,20 @@ class MediaGalleriesHandler : public OptionsPageUIHandler,
// Called when the list of known galleries has changed; updates the page.
void OnGalleriesChanged();
+ // Bottom half of |InitializePage()| after async call to initialize
+ // StorageMonitor.
+ void InitializeOnStorageMonitorInit();
+
+ // Bottom half of |RegisterMessages()| after async call to initialize
+ // StorageMonitor.
+ void RegisterOnStorageMonitorInit();
+
PrefChangeRegistrar pref_change_registrar_;
scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
+ base::WeakPtrFactory<MediaGalleriesHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesHandler);
};

Powered by Google App Engine
This is Rietveld 408576698