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

Side by Side Diff: chrome/browser/ui/tabs/pinned_tab_codec.h

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/sync/sync_promo_ui.cc ('k') | chrome/browser/ui/tabs/pinned_tab_codec.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TABS_PINNED_TAB_CODEC_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_PINNED_TAB_CODEC_H_
6 #define CHROME_BROWSER_UI_TABS_PINNED_TAB_CODEC_H_ 6 #define CHROME_BROWSER_UI_TABS_PINNED_TAB_CODEC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "chrome/browser/ui/startup/startup_tab.h" 10 #include "chrome/browser/ui/startup/startup_tab.h"
(...skipping 12 matching lines...) Expand all
23 // PinnedTabCodec is used to read and write the set of pinned tabs to 23 // PinnedTabCodec is used to read and write the set of pinned tabs to
24 // preferences. When Chrome exits the sets of pinned tabs are written to prefs. 24 // preferences. When Chrome exits the sets of pinned tabs are written to prefs.
25 // On startup if the user has not chosen to restore the last session the set of 25 // On startup if the user has not chosen to restore the last session the set of
26 // pinned tabs is opened. 26 // pinned tabs is opened.
27 // 27 //
28 // The entries are stored in preferences as a list of dictionaries, with each 28 // The entries are stored in preferences as a list of dictionaries, with each
29 // dictionary describing the entry. 29 // dictionary describing the entry.
30 class PinnedTabCodec { 30 class PinnedTabCodec {
31 public: 31 public:
32 // Registers the preference used by this class. 32 // Registers the preference used by this class.
33 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); 33 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
34 34
35 // Resets the preferences state. 35 // Resets the preferences state.
36 static void WritePinnedTabs(Profile* profile); 36 static void WritePinnedTabs(Profile* profile);
37 37
38 // Sets the preferences state from the specified tab list. 38 // Sets the preferences state from the specified tab list.
39 static void WritePinnedTabs(Profile* profile, const StartupTabs& tabs); 39 static void WritePinnedTabs(Profile* profile, const StartupTabs& tabs);
40 40
41 // Reads and returns the set of pinned tabs to restore from preferences. 41 // Reads and returns the set of pinned tabs to restore from preferences.
42 static StartupTabs ReadPinnedTabs(Profile* profile); 42 static StartupTabs ReadPinnedTabs(Profile* profile);
43 static StartupTabs ReadPinnedTabs(const base::Value* value); 43 static StartupTabs ReadPinnedTabs(const base::Value* value);
44 44
45 private: 45 private:
46 PinnedTabCodec(); 46 PinnedTabCodec();
47 ~PinnedTabCodec(); 47 ~PinnedTabCodec();
48 48
49 DISALLOW_COPY_AND_ASSIGN(PinnedTabCodec); 49 DISALLOW_COPY_AND_ASSIGN(PinnedTabCodec);
50 }; 50 };
51 51
52 #endif // CHROME_BROWSER_UI_TABS_PINNED_TAB_CODEC_H_ 52 #endif // CHROME_BROWSER_UI_TABS_PINNED_TAB_CODEC_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/sync_promo_ui.cc ('k') | chrome/browser/ui/tabs/pinned_tab_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698