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 "extensions/browser/lazy_background_task_queue.h" | 5 #include "extensions/browser/lazy_background_task_queue.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 default: | 172 default: |
173 NOTREACHED(); | 173 NOTREACHED(); |
174 break; | 174 break; |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 void LazyBackgroundTaskQueue::OnExtensionUnloaded( | 178 void LazyBackgroundTaskQueue::OnExtensionUnloaded( |
179 content::BrowserContext* browser_context, | 179 content::BrowserContext* browser_context, |
180 const Extension* extension, | 180 const Extension* extension, |
181 UnloadedExtensionInfo::Reason reason) { | 181 UnloadedExtensionReason reason) { |
182 // Notify consumers that the page failed to load. | 182 // Notify consumers that the page failed to load. |
183 ProcessPendingTasks(NULL, browser_context, extension); | 183 ProcessPendingTasks(NULL, browser_context, extension); |
184 // If this extension is also running in an off-the-record context, notify that | 184 // If this extension is also running in an off-the-record context, notify that |
185 // task queue as well. | 185 // task queue as well. |
186 ExtensionsBrowserClient* browser_client = ExtensionsBrowserClient::Get(); | 186 ExtensionsBrowserClient* browser_client = ExtensionsBrowserClient::Get(); |
187 if (browser_client->HasOffTheRecordContext(browser_context)) { | 187 if (browser_client->HasOffTheRecordContext(browser_context)) { |
188 ProcessPendingTasks(NULL, | 188 ProcessPendingTasks(NULL, |
189 browser_client->GetOffTheRecordContext(browser_context), | 189 browser_client->GetOffTheRecordContext(browser_context), |
190 extension); | 190 extension); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 } // namespace extensions | 194 } // namespace extensions |
OLD | NEW |