OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/profiles/profiles_state.h" | 5 #include "chrome/browser/profiles/profiles_state.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/prefs/pref_registry_simple.h" | |
11 #include "base/prefs/pref_service.h" | |
12 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
13 #include "build/build_config.h" | 11 #include "build/build_config.h" |
14 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 13 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
16 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 14 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
17 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" | 15 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" |
18 #include "chrome/browser/profiles/gaia_info_update_service.h" | 16 #include "chrome/browser/profiles/gaia_info_update_service.h" |
19 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" | 17 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" |
20 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/profiles/profile_info_cache.h" | 19 #include "chrome/browser/profiles/profile_info_cache.h" |
22 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
23 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 21 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
24 #include "chrome/browser/signin/signin_error_controller_factory.h" | 22 #include "chrome/browser/signin/signin_error_controller_factory.h" |
25 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
26 #include "chrome/common/chrome_constants.h" | 24 #include "chrome/common/chrome_constants.h" |
27 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
28 #include "chrome/grit/generated_resources.h" | 26 #include "chrome/grit/generated_resources.h" |
| 27 #include "components/prefs/pref_registry_simple.h" |
| 28 #include "components/prefs/pref_service.h" |
29 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 29 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
30 #include "components/signin/core/common/profile_management_switches.h" | 30 #include "components/signin/core/common/profile_management_switches.h" |
31 #include "components/signin/core/common/signin_pref_names.h" | 31 #include "components/signin/core/common/signin_pref_names.h" |
32 #include "content/public/browser/resource_dispatcher_host.h" | 32 #include "content/public/browser/resource_dispatcher_host.h" |
33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
34 #include "ui/gfx/text_elider.h" | 34 #include "ui/gfx/text_elider.h" |
35 | 35 |
36 namespace profiles { | 36 namespace profiles { |
37 | 37 |
38 bool IsMultipleProfilesEnabled() { | 38 bool IsMultipleProfilesEnabled() { |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 // shouldn't have a browser. | 246 // shouldn't have a browser. |
247 if (profile_dir == base::FilePath(chrome::kSystemProfileDir).AsUTF8Unsafe()) | 247 if (profile_dir == base::FilePath(chrome::kSystemProfileDir).AsUTF8Unsafe()) |
248 return; | 248 return; |
249 | 249 |
250 PrefService* local_state = g_browser_process->local_state(); | 250 PrefService* local_state = g_browser_process->local_state(); |
251 DCHECK(local_state); | 251 DCHECK(local_state); |
252 local_state->SetString(prefs::kProfileLastUsed, profile_dir); | 252 local_state->SetString(prefs::kProfileLastUsed, profile_dir); |
253 } | 253 } |
254 | 254 |
255 } // namespace profiles | 255 } // namespace profiles |
OLD | NEW |