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

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 20483002: Merge 3 different ways of obtaining first run state into a single one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r214457 -- fix conflict with r214339 -- dcommit since tests pass on previous 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/chrome_browser_main.cc ('k') | chrome/browser/first_run/first_run.h » ('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 #include "chrome/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP), 204 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP),
205 chrome::MESSAGE_BOX_TYPE_WARNING); 205 chrome::MESSAGE_BOX_TYPE_WARNING);
206 } 206 }
207 207
208 return rv; 208 return rv;
209 } 209 }
210 210
211 void ChromeBrowserMainPartsWin::PostMainMessageLoopRun() { 211 void ChromeBrowserMainPartsWin::PostMainMessageLoopRun() {
212 // Log the search engine chosen on first run. Do this at shutdown, after any 212 // Log the search engine chosen on first run. Do this at shutdown, after any
213 // changes are made from the first run bubble link, etc. 213 // changes are made from the first run bubble link, etc.
214 if (do_first_run_tasks() && profile() && !profile()->IsOffTheRecord()) { 214 if (first_run::IsChromeFirstRun() && profile() &&
215 !profile()->IsOffTheRecord()) {
215 TemplateURLService* url_service = 216 TemplateURLService* url_service =
216 TemplateURLServiceFactory::GetForProfile(profile()); 217 TemplateURLServiceFactory::GetForProfile(profile());
217 const TemplateURL* default_search_engine = 218 const TemplateURL* default_search_engine =
218 url_service->GetDefaultSearchProvider(); 219 url_service->GetDefaultSearchProvider();
219 // The default engine can be NULL if the administrator has disabled 220 // The default engine can be NULL if the administrator has disabled
220 // default search. 221 // default search.
221 SearchEngineType search_engine_type = 222 SearchEngineType search_engine_type =
222 TemplateURLPrepopulateData::GetEngineType(default_search_engine ? 223 TemplateURLPrepopulateData::GetEngineType(default_search_engine ?
223 default_search_engine->url() : std::string()); 224 default_search_engine->url() : std::string());
224 // Record the search engine chosen. 225 // Record the search engine chosen.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 if (resource_id) 405 if (resource_id)
405 return l10n_util::GetStringUTF16(resource_id); 406 return l10n_util::GetStringUTF16(resource_id);
406 return string16(); 407 return string16();
407 } 408 }
408 409
409 // static 410 // static
410 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 411 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
411 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 412 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
412 installer::SetTranslationDelegate(&delegate); 413 installer::SetTranslationDelegate(&delegate);
413 } 414 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698