| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FIRST_RUN_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "chrome/browser/prefs/pref_service.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 16 | 17 |
| 17 class CommandLine; | 18 class CommandLine; |
| 18 class FilePath; | 19 class FilePath; |
| 19 class GURL; | 20 class GURL; |
| 20 class Profile; | 21 class Profile; |
| 21 class ProcessSingleton; | 22 class ProcessSingleton; |
| 22 class ImporterHost; | 23 class ImporterHost; |
| 23 class ImporterList; | 24 class ImporterList; |
| 24 | 25 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 static bool SetPersonalDataManagerFirstRunPref(); | 143 static bool SetPersonalDataManagerFirstRunPref(); |
| 143 | 144 |
| 144 // True if special circumstances should prevent the search engine ballot from | 145 // True if special circumstances should prevent the search engine ballot from |
| 145 // being shown. | 146 // being shown. |
| 146 static bool SearchEngineSelectorDisallowed(); | 147 static bool SearchEngineSelectorDisallowed(); |
| 147 | 148 |
| 148 private: | 149 private: |
| 149 friend class FirstRunTest; | 150 friend class FirstRunTest; |
| 150 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); | 151 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); |
| 151 | 152 |
| 153 // Sets the |items| bitfield according to whether the import data specified by |
| 154 // |import_type| should be be auto imported or not. |
| 155 static void SetImportItem(PrefService* user_prefs, |
| 156 const char* pref_path, |
| 157 int import_items, |
| 158 int dont_import_items, |
| 159 int import_type, |
| 160 int& items); |
| 161 |
| 152 #if defined(OS_WIN) | 162 #if defined(OS_WIN) |
| 153 // Writes the EULA to a temporary file, returned in |*eula_path|, and returns | 163 // Writes the EULA to a temporary file, returned in |*eula_path|, and returns |
| 154 // true if successful. | 164 // true if successful. |
| 155 static bool WriteEULAtoTempFile(FilePath* eula_path); | 165 static bool WriteEULAtoTempFile(FilePath* eula_path); |
| 156 | 166 |
| 157 // Launches the setup exe with the given parameter/value on the command-line, | 167 // Launches the setup exe with the given parameter/value on the command-line, |
| 158 // waits for its termination, returns its exit code in |*ret_code|, and | 168 // waits for its termination, returns its exit code in |*ret_code|, and |
| 159 // returns true if the exit code is valid. | 169 // returns true if the exit code is valid. |
| 160 static bool LaunchSetupWithParam(const std::string& param, | 170 static bool LaunchSetupWithParam(const std::string& param, |
| 161 const std::wstring& value, | 171 const std::wstring& value, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 }; | 207 }; |
| 198 | 208 |
| 199 // This variable should only be accessed through IsChromeFirstRun(). | 209 // This variable should only be accessed through IsChromeFirstRun(). |
| 200 static FirstRunState first_run_; | 210 static FirstRunState first_run_; |
| 201 | 211 |
| 202 // This class is for scoping purposes. | 212 // This class is for scoping purposes. |
| 203 DISALLOW_IMPLICIT_CONSTRUCTORS(FirstRun); | 213 DISALLOW_IMPLICIT_CONSTRUCTORS(FirstRun); |
| 204 }; | 214 }; |
| 205 | 215 |
| 206 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 216 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |