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/background/background_mode_manager.h" | 5 #include "chrome/browser/background/background_mode_manager.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/base_paths.h" | 13 #include "base/base_paths.h" |
12 #include "base/bind.h" | 14 #include "base/bind.h" |
13 #include "base/callback.h" | 15 #include "base/callback.h" |
14 #include "base/command_line.h" | 16 #include "base/command_line.h" |
15 #include "base/location.h" | 17 #include "base/location.h" |
16 #include "base/logging.h" | 18 #include "base/logging.h" |
17 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
18 #include "base/prefs/pref_registry_simple.h" | 20 #include "base/prefs/pref_registry_simple.h" |
19 #include "base/prefs/pref_service.h" | 21 #include "base/prefs/pref_service.h" |
20 #include "base/single_thread_task_runner.h" | 22 #include "base/single_thread_task_runner.h" |
21 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
22 #include "base/thread_task_runner_handle.h" | 24 #include "base/thread_task_runner_handle.h" |
| 25 #include "build/build_config.h" |
23 #include "chrome/app/chrome_command_ids.h" | 26 #include "chrome/app/chrome_command_ids.h" |
24 #include "chrome/browser/background/background_application_list_model.h" | 27 #include "chrome/browser/background/background_application_list_model.h" |
25 #include "chrome/browser/background/background_trigger.h" | 28 #include "chrome/browser/background/background_trigger.h" |
26 #include "chrome/browser/browser_process.h" | 29 #include "chrome/browser/browser_process.h" |
27 #include "chrome/browser/browser_shutdown.h" | 30 #include "chrome/browser/browser_shutdown.h" |
28 #include "chrome/browser/chrome_notification_types.h" | 31 #include "chrome/browser/chrome_notification_types.h" |
29 #include "chrome/browser/extensions/extension_service.h" | 32 #include "chrome/browser/extensions/extension_service.h" |
30 #include "chrome/browser/lifetime/application_lifetime.h" | 33 #include "chrome/browser/lifetime/application_lifetime.h" |
31 #include "chrome/browser/profiles/profile.h" | 34 #include "chrome/browser/profiles/profile.h" |
32 #include "chrome/browser/profiles/profile_info_cache.h" | 35 #include "chrome/browser/profiles/profile_info_cache.h" |
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 } | 1022 } |
1020 } | 1023 } |
1021 return profile_it; | 1024 return profile_it; |
1022 } | 1025 } |
1023 | 1026 |
1024 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 1027 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
1025 PrefService* service = g_browser_process->local_state(); | 1028 PrefService* service = g_browser_process->local_state(); |
1026 DCHECK(service); | 1029 DCHECK(service); |
1027 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 1030 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
1028 } | 1031 } |
OLD | NEW |