| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/prefs/pref_registry_simple.h" | 13 #include "base/prefs/pref_registry_simple.h" |
| 14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/app/chrome_command_ids.h" | 16 #include "chrome/app/chrome_command_ids.h" |
| 17 #include "chrome/app/theme/grit/chrome_unscaled_resources.h" | |
| 18 #include "chrome/browser/background/background_application_list_model.h" | 17 #include "chrome/browser/background/background_application_list_model.h" |
| 19 #include "chrome/browser/background/background_mode_manager.h" | 18 #include "chrome/browser/background/background_mode_manager.h" |
| 20 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/browser_shutdown.h" | 20 #include "chrome/browser/browser_shutdown.h" |
| 22 #include "chrome/browser/chrome_notification_types.h" | 21 #include "chrome/browser/chrome_notification_types.h" |
| 23 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
| 24 #include "chrome/browser/lifetime/application_lifetime.h" | 23 #include "chrome/browser/lifetime/application_lifetime.h" |
| 25 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
| 26 #include "chrome/browser/profiles/profile_info_cache.h" | 25 #include "chrome/browser/profiles/profile_info_cache.h" |
| 27 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 39 #include "chrome/common/extensions/extension_constants.h" | 38 #include "chrome/common/extensions/extension_constants.h" |
| 40 #include "chrome/common/extensions/manifest_url_handler.h" | 39 #include "chrome/common/extensions/manifest_url_handler.h" |
| 41 #include "chrome/common/pref_names.h" | 40 #include "chrome/common/pref_names.h" |
| 42 #include "chrome/grit/chromium_strings.h" | 41 #include "chrome/grit/chromium_strings.h" |
| 43 #include "chrome/grit/generated_resources.h" | 42 #include "chrome/grit/generated_resources.h" |
| 44 #include "content/public/browser/notification_service.h" | 43 #include "content/public/browser/notification_service.h" |
| 45 #include "content/public/browser/user_metrics.h" | 44 #include "content/public/browser/user_metrics.h" |
| 46 #include "extensions/browser/extension_system.h" | 45 #include "extensions/browser/extension_system.h" |
| 47 #include "extensions/common/extension.h" | 46 #include "extensions/common/extension.h" |
| 48 #include "extensions/common/permissions/permission_set.h" | 47 #include "extensions/common/permissions/permission_set.h" |
| 48 #include "grit/chrome_unscaled_resources.h" |
| 49 #include "ui/base/l10n/l10n_util.h" | 49 #include "ui/base/l10n/l10n_util.h" |
| 50 #include "ui/base/resource/resource_bundle.h" | 50 #include "ui/base/resource/resource_bundle.h" |
| 51 | 51 |
| 52 using base::UserMetricsAction; | 52 using base::UserMetricsAction; |
| 53 using extensions::Extension; | 53 using extensions::Extension; |
| 54 using extensions::UpdatedExtensionPermissionsInfo; | 54 using extensions::UpdatedExtensionPermissionsInfo; |
| 55 | 55 |
| 56 namespace { | 56 namespace { |
| 57 const int kInvalidExtensionIndex = -1; | 57 const int kInvalidExtensionIndex = -1; |
| 58 } | 58 } |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 } | 800 } |
| 801 } | 801 } |
| 802 return profile_it; | 802 return profile_it; |
| 803 } | 803 } |
| 804 | 804 |
| 805 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { | 805 bool BackgroundModeManager::IsBackgroundModePrefEnabled() const { |
| 806 PrefService* service = g_browser_process->local_state(); | 806 PrefService* service = g_browser_process->local_state(); |
| 807 DCHECK(service); | 807 DCHECK(service); |
| 808 return service->GetBoolean(prefs::kBackgroundModeEnabled); | 808 return service->GetBoolean(prefs::kBackgroundModeEnabled); |
| 809 } | 809 } |
| OLD | NEW |