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

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

Issue 19689006: Fix crash in Windows chrome with --uninstall flag. This was a regression from r210884. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | « no previous file | no next file » | 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP), 205 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP),
206 chrome::MESSAGE_BOX_TYPE_WARNING); 206 chrome::MESSAGE_BOX_TYPE_WARNING);
207 } 207 }
208 208
209 return rv; 209 return rv;
210 } 210 }
211 211
212 void ChromeBrowserMainPartsWin::PostMainMessageLoopRun() { 212 void ChromeBrowserMainPartsWin::PostMainMessageLoopRun() {
213 // Log the search engine chosen on first run. Do this at shutdown, after any 213 // Log the search engine chosen on first run. Do this at shutdown, after any
214 // changes are made from the first run bubble link, etc. 214 // changes are made from the first run bubble link, etc.
215 if (do_first_run_tasks() && !profile()->IsOffTheRecord()) { 215 if (do_first_run_tasks() && profile() && !profile()->IsOffTheRecord()) {
216 TemplateURLService* url_service = 216 TemplateURLService* url_service =
217 TemplateURLServiceFactory::GetForProfile(profile()); 217 TemplateURLServiceFactory::GetForProfile(profile());
218 const TemplateURL* default_search_engine = 218 const TemplateURL* default_search_engine =
219 url_service->GetDefaultSearchProvider(); 219 url_service->GetDefaultSearchProvider();
220 // The default engine can be NULL if the administrator has disabled 220 // The default engine can be NULL if the administrator has disabled
221 // default search. 221 // default search.
222 SearchEngineType search_engine_type = 222 SearchEngineType search_engine_type =
223 TemplateURLPrepopulateData::GetEngineType(default_search_engine ? 223 TemplateURLPrepopulateData::GetEngineType(default_search_engine ?
224 default_search_engine->url() : std::string()); 224 default_search_engine->url() : std::string());
225 // Record the search engine chosen. 225 // Record the search engine chosen.
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (resource_id) 411 if (resource_id)
412 return l10n_util::GetStringUTF16(resource_id); 412 return l10n_util::GetStringUTF16(resource_id);
413 return string16(); 413 return string16();
414 } 414 }
415 415
416 // static 416 // static
417 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 417 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
418 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 418 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
419 installer::SetTranslationDelegate(&delegate); 419 installer::SetTranslationDelegate(&delegate);
420 } 420 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698