| 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 <shellapi.h> | 7 #include <shellapi.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { | 346 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { |
| 347 ui::MessageBox(NULL, | 347 ui::MessageBox(NULL, |
| 348 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), | 348 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), |
| 349 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), | 349 base::ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), |
| 350 MB_OK | MB_ICONERROR | MB_TOPMOST); | 350 MB_OK | MB_ICONERROR | MB_TOPMOST); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void ChromeBrowserMainPartsWin::PostProfileInit() { | 353 void ChromeBrowserMainPartsWin::PostProfileInit() { |
| 354 ChromeBrowserMainParts::PostProfileInit(); | 354 ChromeBrowserMainParts::PostProfileInit(); |
| 355 | 355 |
| 356 // TODO(kulshin): remove this cleanup code in 2017. http://crbug.com/603718 | |
| 357 // Attempt to delete the font cache and ignore any errors. | |
| 358 base::FilePath path( | |
| 359 profile()->GetPath().AppendASCII("ChromeDWriteFontCache")); | |
| 360 content::BrowserThread::PostAfterStartupTask( | |
| 361 FROM_HERE, content::BrowserThread::GetTaskRunnerForThread( | |
| 362 content::BrowserThread::FILE), | |
| 363 base::Bind(base::IgnoreResult(&base::DeleteFile), path, false)); | |
| 364 | |
| 365 // Create the module database and hook up the in-process module watcher. This | 356 // Create the module database and hook up the in-process module watcher. This |
| 366 // needs to be done before any child processes are initialized as the | 357 // needs to be done before any child processes are initialized as the |
| 367 // ModuleDatabase is an endpoint for IPC from child processes. | 358 // ModuleDatabase is an endpoint for IPC from child processes. |
| 368 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) | 359 if (base::FeatureList::IsEnabled(features::kModuleDatabase)) |
| 369 SetupModuleDatabase(&module_watcher_); | 360 SetupModuleDatabase(&module_watcher_); |
| 370 } | 361 } |
| 371 | 362 |
| 372 void ChromeBrowserMainPartsWin::PostBrowserStart() { | 363 void ChromeBrowserMainPartsWin::PostBrowserStart() { |
| 373 ChromeBrowserMainParts::PostBrowserStart(); | 364 ChromeBrowserMainParts::PostBrowserStart(); |
| 374 | 365 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 if (resource_id) | 556 if (resource_id) |
| 566 return l10n_util::GetStringUTF16(resource_id); | 557 return l10n_util::GetStringUTF16(resource_id); |
| 567 return base::string16(); | 558 return base::string16(); |
| 568 } | 559 } |
| 569 | 560 |
| 570 // static | 561 // static |
| 571 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 562 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 572 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 563 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 573 installer::SetTranslationDelegate(&delegate); | 564 installer::SetTranslationDelegate(&delegate); |
| 574 } | 565 } |
| OLD | NEW |