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

Unified Diff: chrome/browser/jumplist_win.h

Issue 549953003: Hide "New incognito window" from jump list if disabled by policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years, 3 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 | « no previous file | chrome/browser/jumplist_win.cc » ('j') | chrome/browser/jumplist_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/jumplist_win.h
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index 30739d68fbd23aa37394e2e7f1ecd0647839fae6..e43465f56e3cec5b41f7779bfdf3ffbf7d5f2dac 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -17,6 +17,7 @@
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/jumplist_updater_win.h"
+#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "content/public/browser/browser_thread.h"
@@ -29,8 +30,9 @@ namespace content {
class NotificationRegistrar;
}
-class Profile;
class PageUsageData;
+class PrefChangeRegistrar;
+class Profile;
// A class which implements an application JumpList.
// This class encapsulates operations required for updating an application
@@ -120,9 +122,15 @@ class JumpList : public TabRestoreServiceObserver,
void OnMostVisitedURLsAvailable(
const history::MostVisitedURLList& data);
+ // Callback for changes to the incognito mode availability pref.
+ void OnIncognitoAvailabilityChanged();
sky 2014/09/08 16:15:17 Can this and the PostRunUpdate be private?
Joao da Silva 2014/09/08 16:44:10 Done.
+
+ // Helper for RunUpdate() that determines its parameters.
+ void PostRunUpdate();
+
// Runnable method that updates the jumplist, once all the data
// has been fetched.
- void RunUpdate();
+ void RunUpdate(IncognitoModePrefs::Availability incognito_availability);
// Helper method for RunUpdate to create icon files for the asynchrounously
// loaded icons.
@@ -145,6 +153,7 @@ class JumpList : public TabRestoreServiceObserver,
// Lives on the UI thread.
scoped_ptr<content::NotificationRegistrar> registrar_;
+ scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;
// App id to associate with the jump list.
std::wstring app_id_;
« no previous file with comments | « no previous file | chrome/browser/jumplist_win.cc » ('j') | chrome/browser/jumplist_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698