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

Side by Side Diff: chrome/browser/prefs/session_startup_pref.h

Issue 21130008: Merge 214426 "Add histograms for session startup enum and number..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 years, 4 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/prefs/pref_metrics_service.cc ('k') | tools/metrics/histograms/histograms.xml » ('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_PREFS_SESSION_STARTUP_PREF_H__ 5 #ifndef CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__
6 #define CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ 6 #define CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 21 matching lines...) Expand all
32 // Indicates the user wants to restore a specific set of URLs. The URLs 32 // Indicates the user wants to restore a specific set of URLs. The URLs
33 // are contained in urls. 33 // are contained in urls.
34 URLS, 34 URLS,
35 35
36 // Number of values in this enum. 36 // Number of values in this enum.
37 TYPE_COUNT 37 TYPE_COUNT
38 }; 38 };
39 39
40 // For historical reasons the enum and value registered in the prefs don't 40 // For historical reasons the enum and value registered in the prefs don't
41 // line up. These are the values registered in prefs. 41 // line up. These are the values registered in prefs.
42 // The values are also recorded in Settings.StartupPageLoadSettings histogram,
43 // so make sure to update histograms.xml if you change these.
42 static const int kPrefValueHomePage = 0; // Deprecated 44 static const int kPrefValueHomePage = 0; // Deprecated
43 static const int kPrefValueLast = 1; 45 static const int kPrefValueLast = 1;
44 static const int kPrefValueURLs = 4; 46 static const int kPrefValueURLs = 4;
45 static const int kPrefValueNewTab = 5; 47 static const int kPrefValueNewTab = 5;
48 static const int kPrefValueMax = 6;
46 49
47 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); 50 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
48 51
49 // Returns the default value for |type|. 52 // Returns the default value for |type|.
50 static Type GetDefaultStartupType(); 53 static Type GetDefaultStartupType();
51 54
52 // What should happen on startup for the specified profile. 55 // What should happen on startup for the specified profile.
53 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref); 56 static void SetStartupPref(Profile* profile, const SessionStartupPref& pref);
54 static void SetStartupPref(PrefService* prefs, 57 static void SetStartupPref(PrefService* prefs,
55 const SessionStartupPref& pref); 58 const SessionStartupPref& pref);
(...skipping 24 matching lines...) Expand all
80 ~SessionStartupPref(); 83 ~SessionStartupPref();
81 84
82 // What to do on startup. 85 // What to do on startup.
83 Type type; 86 Type type;
84 87
85 // The URLs to restore. Only used if type == URLS. 88 // The URLs to restore. Only used if type == URLS.
86 std::vector<GURL> urls; 89 std::vector<GURL> urls;
87 }; 90 };
88 91
89 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__ 92 #endif // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_metrics_service.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698