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

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

Issue 8387039: Move content_restriction.h and main_function_params.h to content/public/common, and put them in t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_linux.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "chrome/common/env_vars.h" 83 #include "chrome/common/env_vars.h"
84 #include "chrome/common/json_pref_store.h" 84 #include "chrome/common/json_pref_store.h"
85 #include "chrome/common/jstemplate_builder.h" 85 #include "chrome/common/jstemplate_builder.h"
86 #include "chrome/common/logging_chrome.h" 86 #include "chrome/common/logging_chrome.h"
87 #include "chrome/common/net/net_resource_provider.h" 87 #include "chrome/common/net/net_resource_provider.h"
88 #include "chrome/common/pref_names.h" 88 #include "chrome/common/pref_names.h"
89 #include "chrome/common/profiling.h" 89 #include "chrome/common/profiling.h"
90 #include "chrome/installer/util/google_update_settings.h" 90 #include "chrome/installer/util/google_update_settings.h"
91 #include "content/browser/renderer_host/resource_dispatcher_host.h" 91 #include "content/browser/renderer_host/resource_dispatcher_host.h"
92 #include "content/common/child_process.h" 92 #include "content/common/child_process.h"
93 #include "content/common/main_function_params.h"
94 #include "content/public/browser/browser_thread.h" 93 #include "content/public/browser/browser_thread.h"
95 #include "content/public/common/content_client.h" 94 #include "content/public/common/content_client.h"
95 #include "content/public/common/main_function_params.h"
96 #include "grit/app_locale_settings.h" 96 #include "grit/app_locale_settings.h"
97 #include "grit/chromium_strings.h" 97 #include "grit/chromium_strings.h"
98 #include "grit/generated_resources.h" 98 #include "grit/generated_resources.h"
99 #include "grit/platform_locale_settings.h" 99 #include "grit/platform_locale_settings.h"
100 #include "net/base/cookie_monster.h" 100 #include "net/base/cookie_monster.h"
101 #include "net/base/net_module.h" 101 #include "net/base/net_module.h"
102 #include "net/base/sdch_manager.h" 102 #include "net/base/sdch_manager.h"
103 #include "net/http/http_basic_stream.h" 103 #include "net/http/http_basic_stream.h"
104 #include "net/http/http_network_layer.h" 104 #include "net/http/http_network_layer.h"
105 #include "net/http/http_stream_factory.h" 105 #include "net/http/http_stream_factory.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 406 }
407 } 407 }
408 #endif 408 #endif
409 409
410 return local_state; 410 return local_state;
411 } 411 }
412 412
413 // Initializes the profile, possibly doing some user prompting to pick a 413 // Initializes the profile, possibly doing some user prompting to pick a
414 // fallback profile. Returns the newly created profile, or NULL if startup 414 // fallback profile. Returns the newly created profile, or NULL if startup
415 // should not continue. 415 // should not continue.
416 Profile* CreateProfile(const MainFunctionParams& parameters, 416 Profile* CreateProfile(const content::MainFunctionParams& parameters,
417 const FilePath& user_data_dir, 417 const FilePath& user_data_dir,
418 const CommandLine& parsed_command_line) { 418 const CommandLine& parsed_command_line) {
419 Profile* profile; 419 Profile* profile;
420 if (ProfileManager::IsMultipleProfilesEnabled() && 420 if (ProfileManager::IsMultipleProfilesEnabled() &&
421 parsed_command_line.HasSwitch(switches::kProfileDirectory)) { 421 parsed_command_line.HasSwitch(switches::kProfileDirectory)) {
422 g_browser_process->local_state()->SetString(prefs::kProfileLastUsed, 422 g_browser_process->local_state()->SetString(prefs::kProfileLastUsed,
423 parsed_command_line.GetSwitchValueASCII( 423 parsed_command_line.GetSwitchValueASCII(
424 switches::kProfileDirectory)); 424 switches::kProfileDirectory));
425 } 425 }
426 profile = g_browser_process->profile_manager()->GetLastUsedProfile( 426 profile = g_browser_process->profile_manager()->GetLastUsedProfile(
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 // This error message is not localized because we failed to load the 673 // This error message is not localized because we failed to load the
674 // localization data files. 674 // localization data files.
675 const char kMissingLocaleDataTitle[] = "Missing File Error"; 675 const char kMissingLocaleDataTitle[] = "Missing File Error";
676 const char kMissingLocaleDataMessage[] = 676 const char kMissingLocaleDataMessage[] =
677 "Unable to find locale data files. Please reinstall."; 677 "Unable to find locale data files. Please reinstall.";
678 } // namespace chrome_browser 678 } // namespace chrome_browser
679 679
680 // BrowserMainParts ------------------------------------------------------------ 680 // BrowserMainParts ------------------------------------------------------------
681 681
682 ChromeBrowserMainParts::ChromeBrowserMainParts( 682 ChromeBrowserMainParts::ChromeBrowserMainParts(
683 const MainFunctionParams& parameters) 683 const content::MainFunctionParams& parameters)
684 : parameters_(parameters), 684 : parameters_(parameters),
685 parsed_command_line_(parameters.command_line), 685 parsed_command_line_(parameters.command_line),
686 result_code_(content::RESULT_CODE_NORMAL_EXIT), 686 result_code_(content::RESULT_CODE_NORMAL_EXIT),
687 shutdown_watcher_(new ShutdownWatcherHelper()), 687 shutdown_watcher_(new ShutdownWatcherHelper()),
688 record_search_engine_(false), 688 record_search_engine_(false),
689 translate_manager_(NULL), 689 translate_manager_(NULL),
690 profile_(NULL), 690 profile_(NULL),
691 run_message_loop_(true), 691 run_message_loop_(true),
692 notify_result_(ProcessSingleton::PROCESS_NONE) { 692 notify_result_(ProcessSingleton::PROCESS_NONE) {
693 // If we're running tests (ui_task is non-null). 693 // If we're running tests (ui_task is non-null).
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2126 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2127 (pre_read == "0" || pre_read == "1")) { 2127 (pre_read == "0" || pre_read == "1")) {
2128 std::string uma_name(name); 2128 std::string uma_name(name);
2129 uma_name += "_PreRead"; 2129 uma_name += "_PreRead";
2130 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2130 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2131 AddPreReadHistogramTime(uma_name.c_str(), time); 2131 AddPreReadHistogramTime(uma_name.c_str(), time);
2132 } 2132 }
2133 #endif 2133 #endif
2134 #endif 2134 #endif
2135 } 2135 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_browser_main_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698