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

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

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catch up to SystemInfoStorage eject test 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
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>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/environment.h" 13 #include "base/environment.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/scoped_native_library.h" 18 #include "base/scoped_native_library.h"
19 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "base/win/metro.h" 21 #include "base/win/metro.h"
22 #include "base/win/windows_version.h" 22 #include "base/win/windows_version.h"
23 #include "base/win/wrapped_window_proc.h" 23 #include "base/win/wrapped_window_proc.h"
24 #include "chrome/browser/browser_util_win.h" 24 #include "chrome/browser/browser_util_win.h"
25 #include "chrome/browser/first_run/first_run.h" 25 #include "chrome/browser/first_run/first_run.h"
26 #include "chrome/browser/metrics/metrics_service.h" 26 #include "chrome/browser/metrics/metrics_service.h"
27 #include "chrome/browser/profiles/profile_info_cache.h" 27 #include "chrome/browser/profiles/profile_info_cache.h"
28 #include "chrome/browser/profiles/profile_shortcut_manager.h" 28 #include "chrome/browser/profiles/profile_shortcut_manager.h"
29 #include "chrome/browser/shell_integration.h" 29 #include "chrome/browser/shell_integration.h"
30 #include "chrome/browser/storage_monitor/storage_monitor_win.h"
31 #include "chrome/browser/search_engines/template_url.h" 30 #include "chrome/browser/search_engines/template_url.h"
32 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 31 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
33 #include "chrome/browser/search_engines/template_url_service.h" 32 #include "chrome/browser/search_engines/template_url_service.h"
34 #include "chrome/browser/search_engines/template_url_service_factory.h" 33 #include "chrome/browser/search_engines/template_url_service_factory.h"
35 #include "chrome/browser/ui/simple_message_box.h" 34 #include "chrome/browser/ui/simple_message_box.h"
36 #include "chrome/browser/ui/uninstall_browser_prompt.h" 35 #include "chrome/browser/ui/uninstall_browser_prompt.h"
37 #include "chrome/common/chrome_constants.h" 36 #include "chrome/common/chrome_constants.h"
38 #include "chrome/common/chrome_result_codes.h" 37 #include "chrome/common/chrome_result_codes.h"
39 #include "chrome/common/chrome_switches.h" 38 #include "chrome/common/chrome_switches.h"
40 #include "chrome/common/env_vars.h" 39 #include "chrome/common/env_vars.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 TemplateURLPrepopulateData::GetEngineType(default_search_engine ? 222 TemplateURLPrepopulateData::GetEngineType(default_search_engine ?
224 default_search_engine->url() : std::string()); 223 default_search_engine->url() : std::string());
225 // Record the search engine chosen. 224 // Record the search engine chosen.
226 UMA_HISTOGRAM_ENUMERATION("Chrome.SearchSelectExempt", search_engine_type, 225 UMA_HISTOGRAM_ENUMERATION("Chrome.SearchSelectExempt", search_engine_type,
227 SEARCH_ENGINE_MAX); 226 SEARCH_ENGINE_MAX);
228 } 227 }
229 228
230 ChromeBrowserMainParts::PostMainMessageLoopRun(); 229 ChromeBrowserMainParts::PostMainMessageLoopRun();
231 } 230 }
232 231
233 void ChromeBrowserMainPartsWin::PreProfileInit() {
234 storage_monitor_.reset(chrome::StorageMonitorWin::Create());
235
236 ChromeBrowserMainParts::PreProfileInit();
237 }
238
239 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() { 232 void ChromeBrowserMainPartsWin::ShowMissingLocaleMessageBox() {
240 ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage), 233 ui::MessageBox(NULL, ASCIIToUTF16(chrome_browser::kMissingLocaleDataMessage),
241 ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle), 234 ASCIIToUTF16(chrome_browser::kMissingLocaleDataTitle),
242 MB_OK | MB_ICONERROR | MB_TOPMOST); 235 MB_OK | MB_ICONERROR | MB_TOPMOST);
243 } 236 }
244 237
245 // static 238 // static
246 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment( 239 void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
247 const CommandLine& parsed_command_line) { 240 const CommandLine& parsed_command_line) {
248 // Clear this var so child processes don't show the dialog by default. 241 // Clear this var so child processes don't show the dialog by default.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (resource_id) 404 if (resource_id)
412 return l10n_util::GetStringUTF16(resource_id); 405 return l10n_util::GetStringUTF16(resource_id);
413 return string16(); 406 return string16();
414 } 407 }
415 408
416 // static 409 // static
417 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 410 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
418 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 411 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
419 installer::SetTranslationDelegate(&delegate); 412 installer::SetTranslationDelegate(&delegate);
420 } 413 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_win.h ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698