| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |