| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_page_tracker.h" | 5 #include "chrome/browser/background_page_tracker.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "chrome/browser/background_application_list_model.h" | 12 #include "chrome/browser/background_application_list_model.h" |
| 13 #include "chrome/browser/background_contents_service.h" | 13 #include "chrome/browser/background_contents_service.h" |
| 14 #include "chrome/browser/background_mode_manager.h" | 14 #include "chrome/browser/background_mode_manager.h" |
| 15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/extensions/extensions_service.h" | 16 #include "chrome/browser/extensions/extensions_service.h" |
| 17 #include "chrome/browser/prefs/pref_service.h" | 17 #include "chrome/browser/prefs/pref_service.h" |
| 18 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
| 20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
| 22 #include "chrome/common/notification_service.h" | 22 #include "chrome/common/notification_service.h" |
| 23 #include "chrome/common/notification_type.h" | 23 #include "chrome/common/notification_type.h" |
| 24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
| 25 | 25 |
| 26 /////////////////////////////////////////////////////////////////////////////// | 26 /////////////////////////////////////////////////////////////////////////////// |
| 27 // BackgroundPageTracker keeps a single DictionaryValue (stored at | 27 // BackgroundPageTracker keeps a single DictionaryValue (stored at |
| 28 // prefs::kKnownBackgroundPages). We keep only two pieces of information for | 28 // prefs::kKnownBackgroundPages). We keep only two pieces of information for |
| 29 // each background page: the parent application/extension ID, and a boolean | 29 // each background page: the parent application/extension ID, and a boolean |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 prefs->ScheduleSavePersistentPrefs(); | 286 prefs->ScheduleSavePersistentPrefs(); |
| 287 SendChangeNotification(); | 287 SendChangeNotification(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void BackgroundPageTracker::SendChangeNotification() { | 290 void BackgroundPageTracker::SendChangeNotification() { |
| 291 NotificationService::current()->Notify( | 291 NotificationService::current()->Notify( |
| 292 NotificationType::BACKGROUND_PAGE_TRACKER_CHANGED, | 292 NotificationType::BACKGROUND_PAGE_TRACKER_CHANGED, |
| 293 Source<BackgroundPageTracker>(this), | 293 Source<BackgroundPageTracker>(this), |
| 294 NotificationService::NoDetails()); | 294 NotificationService::NoDetails()); |
| 295 } | 295 } |
| OLD | NEW |