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

Side by Side Diff: chrome/browser/first_run/first_run_posix.cc

Issue 10756023: Fix the first_run regression issue related to skip_first_run_ui setting processing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change back to SkipFirstRunUI. Created 8 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
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 #include "chrome/browser/first_run/first_run.h" 5 #include "chrome/browser/first_run/first_run.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/first_run/first_run_internal.h" 9 #include "chrome/browser/first_run/first_run_internal.h"
10 #include "chrome/browser/importer/importer_host.h" 10 #include "chrome/browser/importer/importer_host.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 out_prefs->new_tabs = install_prefs->GetFirstRunTabs(); 140 out_prefs->new_tabs = install_prefs->GetFirstRunTabs();
141 141
142 internal::SetRLZPref(out_prefs, install_prefs.get()); 142 internal::SetRLZPref(out_prefs, install_prefs.get());
143 143
144 if (!internal::CopyPrefFile(user_data_dir, master_prefs_path)) 144 if (!internal::CopyPrefFile(user_data_dir, master_prefs_path))
145 return true; 145 return true;
146 146
147 internal::SetupMasterPrefsFromInstallPrefs(out_prefs, 147 internal::SetupMasterPrefsFromInstallPrefs(out_prefs,
148 install_prefs.get()); 148 install_prefs.get());
149 149
150 // TODO(mirandac): Refactor skip-first-run-ui process into regular first run
151 // import process. http://crbug.com/49647
152 // Note we are skipping all other master preferences if skip-first-run-ui
153 // is *not* specified. (That is, we continue only if skipping first run ui.)
150 if (!internal::SkipFirstRunUI(install_prefs.get())) 154 if (!internal::SkipFirstRunUI(install_prefs.get()))
msw 2012/07/10 17:31:46 We probably shouldn't ignore the rest of the maste
jennyz 2012/07/10 18:42:52 For the above change you proposed, I am a little c
msw 2012/07/10 19:33:19 Ah, I see what you mean. This code is horribly con
151 return true; 155 return true;
152 156
153 // From here on we won't show first run so we need to do the work to show the 157 // From here on we won't show first run so we need to do the work to show the
154 // bubble anyway, unless it's already been explicitly suppressed. 158 // bubble anyway, unless it's already been explicitly suppressed.
155 SetShowFirstRunBubblePref(true); 159 SetShowFirstRunBubblePref(true);
156 160
157 // We need to be able to create the first run sentinel or else we cannot 161 // We need to be able to create the first run sentinel or else we cannot
158 // proceed because ImportSettings will launch the importer process which 162 // proceed because ImportSettings will launch the importer process which
159 // would end up here if the sentinel is not present. 163 // would end up here if the sentinel is not present.
160 if (!CreateSentinel()) 164 if (!CreateSentinel())
161 return false; 165 return false;
162 166
163 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); 167 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get());
164 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); 168 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get());
165 internal::SetDefaultBrowser(install_prefs.get()); 169 internal::SetDefaultBrowser(install_prefs.get());
166 170
167 return false; 171 return false;
168 } 172 }
169 173
170 174
171 } // namespace first_run 175 } // namespace first_run
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run_internal.h ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698