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

Side by Side Diff: chrome/browser/first_run.h

Issue 2934011: New first run sequence for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Added support for control of all import via master_preferences Created 10 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/browser_main.cc ('k') | chrome/browser/first_run_win.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) 2010 The Chromium Authors. All rights reserved. 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 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_FIRST_RUN_H_ 5 #ifndef CHROME_BROWSER_FIRST_RUN_H_
6 #define CHROME_BROWSER_FIRST_RUN_H_ 6 #define CHROME_BROWSER_FIRST_RUN_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/browser/browser_process_impl.h" 12 #include "chrome/browser/browser_process_impl.h"
13 #include "chrome/browser/importer/importer.h" 13 #include "chrome/browser/importer/importer.h"
14 #include "chrome/common/result_codes.h" 14 #include "chrome/common/result_codes.h"
15 #include "gfx/native_widget_types.h" 15 #include "gfx/native_widget_types.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 17
18 class CommandLine; 18 class CommandLine;
19 class FilePath; 19 class FilePath;
20 class Profile; 20 class Profile;
21 class ProcessSingleton; 21 class ProcessSingleton;
22 22
23 // This class contains the chrome first-run installation actions needed to 23 // This class contains the chrome first-run installation actions needed to
24 // fully test the custom installer. It also contains the opposite actions to 24 // fully test the custom installer. It also contains the opposite actions to
25 // execute during uninstall. When the first run UI is ready we won't 25 // execute during uninstall. When the first run UI is ready we won't
26 // do the actions unconditionally. Currently the only action is to create a 26 // do the actions unconditionally. Currently the only action is to create a
27 // desktop shortcut. 27 // desktop shortcut.
28 // 28 //
29 // The way we detect first-run is by looking at a 'sentinel' file. 29 // The way we detect first-run is by looking at a 'sentinel' file.
30 // If it does not exists we understand that we need to do the first time 30 // If it does not exist we understand that we need to do the first time
31 // install work for this user. After that the sentinel file is created. 31 // install work for this user. After that the sentinel file is created.
32 class FirstRun { 32 class FirstRun {
33 public: 33 public:
34 // There are three types of possible first run bubbles: 34 // There are three types of possible first run bubbles:
35 typedef enum { 35 typedef enum {
36 LARGEBUBBLE = 0, // The normal bubble, with search engine choice 36 LARGEBUBBLE = 0, // The normal bubble, with search engine choice
37 OEMBUBBLE, // Smaller bubble for OEM builds 37 OEMBUBBLE, // Smaller bubble for OEM builds
38 MINIMALBUBBLE // Minimal bubble shown after search engine dialog 38 MINIMALBUBBLE // Minimal bubble shown after search engine dialog
39 } BubbleType; 39 } BubbleType;
40 // See ProcessMasterPreferences for more info about this structure. 40 // See ProcessMasterPreferences for more info about this structure.
(...skipping 17 matching lines...) Expand all
58 // Returns true if we are being run in a locale in which search experiments 58 // Returns true if we are being run in a locale in which search experiments
59 // are allowed. 59 // are allowed.
60 static bool InSearchExperimentLocale(); 60 static bool InSearchExperimentLocale();
61 #endif // OS_WIN 61 #endif // OS_WIN
62 // Import bookmarks and/or browser items (depending on platform support) 62 // Import bookmarks and/or browser items (depending on platform support)
63 // in this process. This function is paired with FirstRun::ImportSettings(). 63 // in this process. This function is paired with FirstRun::ImportSettings().
64 // This function might or might not show a visible UI depending on the 64 // This function might or might not show a visible UI depending on the
65 // cmdline parameters. 65 // cmdline parameters.
66 static int ImportNow(Profile* profile, const CommandLine& cmdline); 66 static int ImportNow(Profile* profile, const CommandLine& cmdline);
67 67
68 // Automatically import history and home page (and search engine, if
69 // nonorganic).
70 static void AutoImport(Profile* profile,
71 bool homepage_defined,
72 int import_items,
73 int dont_import_items,
74 bool search_engine_experiment,
75 bool randomize_search_engine_experiment,
76 ProcessSingleton* process_singleton);
77
68 // The master preferences is a JSON file with the same entries as the 78 // The master preferences is a JSON file with the same entries as the
69 // 'Default\Preferences' file. This function locates this file from a standard 79 // 'Default\Preferences' file. This function locates this file from a standard
70 // location and processes it so it becomes the default preferences in the 80 // location and processes it so it becomes the default preferences in the
71 // profile pointed to by |user_data_dir|. After processing the file, the 81 // profile pointed to by |user_data_dir|. After processing the file, the
72 // function returns true if and only if showing the first run dialog is 82 // function returns true if and only if showing the first run dialog is
73 // needed. The detailed settings in the preference file are reported via 83 // needed. The detailed settings in the preference file are reported via
74 // |preference_details|. 84 // |preference_details|.
75 // 85 //
76 // This function destroys any existing prefs file and it is meant to be 86 // This function destroys any existing prefs file and it is meant to be
77 // invoked only on first run. 87 // invoked only on first run.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // or closed the dialog. 288 // or closed the dialog.
279 bool OpenFirstRunDialog(Profile* profile, 289 bool OpenFirstRunDialog(Profile* profile,
280 bool homepage_defined, 290 bool homepage_defined,
281 int import_items, 291 int import_items,
282 int dont_import_items, 292 int dont_import_items,
283 bool search_engine_experiment, 293 bool search_engine_experiment,
284 bool randomize_search_engine_experiment, 294 bool randomize_search_engine_experiment,
285 ProcessSingleton* process_singleton); 295 ProcessSingleton* process_singleton);
286 296
287 #endif // CHROME_BROWSER_FIRST_RUN_H_ 297 #endif // CHROME_BROWSER_FIRST_RUN_H_
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698