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

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

Issue 11783038: Allow multiple WebUIControllerFactory objects to be registered. This makes is possible to implement… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: reland after bogus revert of r175971 Created 7 years, 10 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 | chrome/browser/chrome_content_browser_client.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.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #if defined(TOOLKIT_GTK) 7 #if defined(TOOLKIT_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "chrome/browser/search_engines/template_url_service_factory.h" 84 #include "chrome/browser/search_engines/template_url_service_factory.h"
85 #include "chrome/browser/service/service_process_control.h" 85 #include "chrome/browser/service/service_process_control.h"
86 #include "chrome/browser/shell_integration.h" 86 #include "chrome/browser/shell_integration.h"
87 #include "chrome/browser/translate/translate_manager.h" 87 #include "chrome/browser/translate/translate_manager.h"
88 #include "chrome/browser/ui/browser.h" 88 #include "chrome/browser/ui/browser.h"
89 #include "chrome/browser/ui/browser_finder.h" 89 #include "chrome/browser/ui/browser_finder.h"
90 #include "chrome/browser/ui/startup/default_browser_prompt.h" 90 #include "chrome/browser/ui/startup/default_browser_prompt.h"
91 #include "chrome/browser/ui/startup/startup_browser_creator.h" 91 #include "chrome/browser/ui/startup/startup_browser_creator.h"
92 #include "chrome/browser/ui/uma_browsing_activity_observer.h" 92 #include "chrome/browser/ui/uma_browsing_activity_observer.h"
93 #include "chrome/browser/ui/user_data_dir_dialog.h" 93 #include "chrome/browser/ui/user_data_dir_dialog.h"
94 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
94 #include "chrome/common/child_process_logging.h" 95 #include "chrome/common/child_process_logging.h"
95 #include "chrome/common/chrome_constants.h" 96 #include "chrome/common/chrome_constants.h"
96 #include "chrome/common/chrome_paths.h" 97 #include "chrome/common/chrome_paths.h"
97 #include "chrome/common/chrome_result_codes.h" 98 #include "chrome/common/chrome_result_codes.h"
98 #include "chrome/common/chrome_switches.h" 99 #include "chrome/common/chrome_switches.h"
99 #include "chrome/common/env_vars.h" 100 #include "chrome/common/env_vars.h"
100 #include "chrome/common/logging_chrome.h" 101 #include "chrome/common/logging_chrome.h"
101 #include "chrome/common/metrics/variations/variations_util.h" 102 #include "chrome/common/metrics/variations/variations_util.h"
102 #include "chrome/common/net/net_resource_provider.h" 103 #include "chrome/common/net/net_resource_provider.h"
103 #include "chrome/common/pref_names.h" 104 #include "chrome/common/pref_names.h"
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 #if defined(OS_CHROMEOS) 1383 #if defined(OS_CHROMEOS)
1383 // On ChromeOS multiple profiles doesn't apply, and will break if we load 1384 // On ChromeOS multiple profiles doesn't apply, and will break if we load
1384 // them this early as the cryptohome hasn't yet been mounted (which happens 1385 // them this early as the cryptohome hasn't yet been mounted (which happens
1385 // only once we log in. 1386 // only once we log in.
1386 std::vector<Profile*> last_opened_profiles; 1387 std::vector<Profile*> last_opened_profiles;
1387 #else 1388 #else
1388 std::vector<Profile*> last_opened_profiles = 1389 std::vector<Profile*> last_opened_profiles =
1389 g_browser_process->profile_manager()->GetLastOpenedProfiles(); 1390 g_browser_process->profile_manager()->GetLastOpenedProfiles();
1390 #endif 1391 #endif
1391 1392
1393 content::WebUIControllerFactory::RegisterFactory(
1394 ChromeWebUIControllerFactory::GetInstance());
1395
1392 if (browser_creator_->Start(parsed_command_line(), FilePath(), 1396 if (browser_creator_->Start(parsed_command_line(), FilePath(),
1393 profile_, last_opened_profiles, &result_code)) { 1397 profile_, last_opened_profiles, &result_code)) {
1394 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 1398 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
1395 // Initialize autoupdate timer. Timer callback costs basically nothing 1399 // Initialize autoupdate timer. Timer callback costs basically nothing
1396 // when browser is not in persistent mode, so it's OK to let it ride on 1400 // when browser is not in persistent mode, so it's OK to let it ride on
1397 // the main thread. This needs to be done here because we don't want 1401 // the main thread. This needs to be done here because we don't want
1398 // to start the timer when Chrome is run inside a test harness. 1402 // to start the timer when Chrome is run inside a test harness.
1399 browser_process_->StartAutoupdateTimer(); 1403 browser_process_->StartAutoupdateTimer();
1400 #endif 1404 #endif
1401 1405
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 if (base::win::GetVersion() <= base::win::VERSION_XP) 1647 if (base::win::GetVersion() <= base::win::VERSION_XP)
1644 uma_name += "_XP"; 1648 uma_name += "_XP";
1645 1649
1646 uma_name += "_PreRead_"; 1650 uma_name += "_PreRead_";
1647 uma_name += pre_read_percentage; 1651 uma_name += pre_read_percentage;
1648 AddPreReadHistogramTime(uma_name.c_str(), time); 1652 AddPreReadHistogramTime(uma_name.c_str(), time);
1649 } 1653 }
1650 #endif 1654 #endif
1651 #endif 1655 #endif
1652 } 1656 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698