Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

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

Issue 1026005: Makes pinned tab restore on startup if you haven't enabled session (Closed)
Patch Set: check Created 10 years, 9 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
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_TABS_PINNED_TAB_CODEC_H_
6 #define CHROME_BROWSER_TABS_PINNED_TAB_CODEC_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "chrome/browser/browser_init.h"
12 #include "googleurl/src/gurl.h"
13
14 class Browser;
15 class PrefService;
16 class Profile;
17
18 // PinnedTabCodec is used to read and write the set of pinned tabs to
19 // preferences. When Chrome exits the sets of pinned tabs are written to prefs.
20 // On startup if the user has not chosen to restore the last session the set of
21 // pinned tabs is opened.
22 //
23 // The entries are stored in preferences as a list of dictionaries, with each
24 // dictionary describing the entry.
25 class PinnedTabCodec {
26 public:
27 // Registers the preference used by this class.
28 static void RegisterUserPrefs(PrefService* prefs);
29
30 // Resets the preferences state.
31 static void WritePinnedTabs(Profile* profile);
32
33 // Reads and returns the set of pinned tabs to restore from preferences.
34 static std::vector<BrowserInit::LaunchWithProfile::Tab> ReadPinnedTabs(
35 Profile* profile);
36
37 private:
38 PinnedTabCodec();
39 ~PinnedTabCodec();
40
41 DISALLOW_COPY_AND_ASSIGN(PinnedTabCodec);
42 };
43
44 #endif // CHROME_BROWSER_TABS_PINNED_TAB_CODEC_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/tabs/pinned_tab_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698