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

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: Rebase on prefs 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..8e4471046d3f6281207529f01365932358dae955 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.h
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.h
@@ -6,7 +6,9 @@
#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/media_galleries/media_galleries_preferences.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "content/public/browser/notification_observer.h"
#include "ui/shell_dialogs/select_file_dialog.h"
@@ -40,10 +42,16 @@ class MediaGalleriesHandler : public OptionsPageUIHandler,
// Called when the list of known galleries has changed; updates the page.
void OnGalleriesChanged();
+ // Bottom half of |OnGalleriesChanged| after async call to initialize
+ // StorageMonitor.
+ void OnStorageMonitorInitialized();
+
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