| 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/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> // For max(). | 9 #include <algorithm> // For max(). |
| 10 #include <set> | 10 #include <set> |
| 11 | 11 |
| 12 #include "apps/app_load_service.h" | 12 #include "apps/app_load_service.h" |
| 13 #include "apps/switches.h" | 13 #include "apps/switches.h" |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/bind_helpers.h" | 15 #include "base/bind_helpers.h" |
| 16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
| 18 #include "base/environment.h" | 18 #include "base/environment.h" |
| 19 #include "base/files/file_path.h" | 19 #include "base/files/file_path.h" |
| 20 #include "base/files/file_util.h" | 20 #include "base/files/file_util.h" |
| 21 #include "base/lazy_instance.h" | 21 #include "base/lazy_instance.h" |
| 22 #include "base/logging.h" | 22 #include "base/logging.h" |
| 23 #include "base/macros.h" | 23 #include "base/macros.h" |
| 24 #include "base/memory/scoped_ptr.h" | 24 #include "base/memory/scoped_ptr.h" |
| 25 #include "base/metrics/histogram_macros.h" | 25 #include "base/metrics/histogram_macros.h" |
| 26 #include "base/metrics/statistics_recorder.h" | 26 #include "base/metrics/statistics_recorder.h" |
| 27 #include "base/metrics/user_metrics.h" | 27 #include "base/metrics/user_metrics.h" |
| 28 #include "base/metrics/user_metrics_action.h" | 28 #include "base/metrics/user_metrics_action.h" |
| 29 #include "base/prefs/pref_registry_simple.h" | |
| 30 #include "base/prefs/pref_service.h" | |
| 31 #include "base/profiler/scoped_profile.h" | 29 #include "base/profiler/scoped_profile.h" |
| 32 #include "base/strings/string_number_conversions.h" | 30 #include "base/strings/string_number_conversions.h" |
| 33 #include "base/strings/string_split.h" | 31 #include "base/strings/string_split.h" |
| 34 #include "base/strings/string_tokenizer.h" | 32 #include "base/strings/string_tokenizer.h" |
| 35 #include "base/strings/utf_string_conversions.h" | 33 #include "base/strings/utf_string_conversions.h" |
| 36 #include "base/threading/thread_restrictions.h" | 34 #include "base/threading/thread_restrictions.h" |
| 37 #include "base/trace_event/trace_event.h" | 35 #include "base/trace_event/trace_event.h" |
| 38 #include "build/build_config.h" | 36 #include "build/build_config.h" |
| 39 #include "chrome/browser/app_mode/app_mode_utils.h" | 37 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 40 #include "chrome/browser/browser_process.h" | 38 #include "chrome/browser/browser_process.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 58 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 56 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 59 #include "chrome/browser/ui/user_manager.h" | 57 #include "chrome/browser/ui/user_manager.h" |
| 60 #include "chrome/common/chrome_constants.h" | 58 #include "chrome/common/chrome_constants.h" |
| 61 #include "chrome/common/chrome_paths.h" | 59 #include "chrome/common/chrome_paths.h" |
| 62 #include "chrome/common/chrome_result_codes.h" | 60 #include "chrome/common/chrome_result_codes.h" |
| 63 #include "chrome/common/chrome_switches.h" | 61 #include "chrome/common/chrome_switches.h" |
| 64 #include "chrome/common/pref_names.h" | 62 #include "chrome/common/pref_names.h" |
| 65 #include "chrome/common/url_constants.h" | 63 #include "chrome/common/url_constants.h" |
| 66 #include "chrome/installer/util/browser_distribution.h" | 64 #include "chrome/installer/util/browser_distribution.h" |
| 67 #include "components/google/core/browser/google_util.h" | 65 #include "components/google/core/browser/google_util.h" |
| 66 #include "components/prefs/pref_registry_simple.h" |
| 67 #include "components/prefs/pref_service.h" |
| 68 #include "components/search_engines/util.h" | 68 #include "components/search_engines/util.h" |
| 69 #include "components/signin/core/common/profile_management_switches.h" | 69 #include "components/signin/core/common/profile_management_switches.h" |
| 70 #include "components/url_formatter/url_fixer.h" | 70 #include "components/url_formatter/url_fixer.h" |
| 71 #include "content/public/browser/browser_thread.h" | 71 #include "content/public/browser/browser_thread.h" |
| 72 #include "content/public/browser/child_process_security_policy.h" | 72 #include "content/public/browser/child_process_security_policy.h" |
| 73 #include "content/public/browser/navigation_controller.h" | 73 #include "content/public/browser/navigation_controller.h" |
| 74 #include "content/public/common/content_switches.h" | 74 #include "content/public/common/content_switches.h" |
| 75 #include "extensions/common/switches.h" | 75 #include "extensions/common/switches.h" |
| 76 #include "net/base/port_util.h" | 76 #include "net/base/port_util.h" |
| 77 | 77 |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 // If we are showing the app list then chrome isn't shown so load the app | 936 // If we are showing the app list then chrome isn't shown so load the app |
| 937 // list's profile rather than chrome's. | 937 // list's profile rather than chrome's. |
| 938 if (command_line.HasSwitch(switches::kShowAppList)) { | 938 if (command_line.HasSwitch(switches::kShowAppList)) { |
| 939 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> | 939 return AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE)-> |
| 940 GetProfilePath(user_data_dir); | 940 GetProfilePath(user_data_dir); |
| 941 } | 941 } |
| 942 | 942 |
| 943 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 943 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
| 944 user_data_dir); | 944 user_data_dir); |
| 945 } | 945 } |
| OLD | NEW |