| 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 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
| 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 6 #define CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 void ShutdownAssociatedBackgroundContents(const base::string16& appid); | 209 void ShutdownAssociatedBackgroundContents(const base::string16& appid); |
| 210 | 210 |
| 211 // Returns true if this BackgroundContents is in the contents_list_. | 211 // Returns true if this BackgroundContents is in the contents_list_. |
| 212 bool IsTracked(BackgroundContents* contents) const; | 212 bool IsTracked(BackgroundContents* contents) const; |
| 213 | 213 |
| 214 // Sends out a notification when our association of background contents with | 214 // Sends out a notification when our association of background contents with |
| 215 // apps may have changed (used by BackgroundApplicationListModel to update the | 215 // apps may have changed (used by BackgroundApplicationListModel to update the |
| 216 // set of background apps as new background contents are opened/closed). | 216 // set of background apps as new background contents are opened/closed). |
| 217 void SendChangeNotification(Profile* profile); | 217 void SendChangeNotification(Profile* profile); |
| 218 | 218 |
| 219 // Checks whether there has been additional |extension_id| failures. If not, |
| 220 // delete the BackoffEntry corresponding to |extension_id|, if exists. |
| 221 void MaybeClearBackoffEntry(const std::string extension_id, |
| 222 int expected_failure_count); |
| 223 |
| 219 // Delay (in ms) before restarting a force-installed extension that crashed. | 224 // Delay (in ms) before restarting a force-installed extension that crashed. |
| 220 static int restart_delay_in_ms_; | 225 static int restart_delay_in_ms_; |
| 221 | 226 |
| 222 // PrefService used to store list of background pages (or NULL if this is | 227 // PrefService used to store list of background pages (or NULL if this is |
| 223 // running under an incognito profile). | 228 // running under an incognito profile). |
| 224 PrefService* prefs_; | 229 PrefService* prefs_; |
| 225 content::NotificationRegistrar registrar_; | 230 content::NotificationRegistrar registrar_; |
| 226 | 231 |
| 227 // Information we track about each BackgroundContents. | 232 // Information we track about each BackgroundContents. |
| 228 struct BackgroundContentsInfo { | 233 struct BackgroundContentsInfo { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 247 ExtensionBackoffEntryMap backoff_map_; | 252 ExtensionBackoffEntryMap backoff_map_; |
| 248 | 253 |
| 249 ScopedObserver<extensions::ExtensionRegistry, | 254 ScopedObserver<extensions::ExtensionRegistry, |
| 250 extensions::ExtensionRegistryObserver> | 255 extensions::ExtensionRegistryObserver> |
| 251 extension_registry_observer_; | 256 extension_registry_observer_; |
| 252 | 257 |
| 253 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); | 258 DISALLOW_COPY_AND_ASSIGN(BackgroundContentsService); |
| 254 }; | 259 }; |
| 255 | 260 |
| 256 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ | 261 #endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_H_ |
| OLD | NEW |