Chromium Code Reviews| 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/extensions/api/runtime/runtime_api.h" | 5 #include "chrome/browser/extensions/api/runtime/runtime_api.h" |
| 6 | 6 |
| 7 #include "chrome/common/extensions/extension.h" | 7 #include "chrome/common/extensions/extension.h" |
| 8 #include "chrome/browser/extensions/extension_event_router.h" | 8 #include "chrome/browser/extensions/extension_event_router.h" |
| 9 #include "chrome/browser/extensions/extension_host.h" | 9 #include "chrome/browser/extensions/extension_host.h" |
| 10 #include "chrome/browser/extensions/extension_process_manager.h" | 10 #include "chrome/browser/extensions/extension_process_manager.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 49 base::Bind(&RuntimeGetBackgroundPageFunction::OnPageLoaded, | 49 base::Bind(&RuntimeGetBackgroundPageFunction::OnPageLoaded, |
| 50 this)); | 50 this)); |
| 51 } else { | 51 } else { |
| 52 error_ = kNoBackgroundPageError; | 52 error_ = kNoBackgroundPageError; |
| 53 return false; | 53 return false; |
| 54 } | 54 } |
| 55 | 55 |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void RuntimeGetBackgroundPageFunction::OnPageLoaded(ExtensionHost*) { | 59 void RuntimeGetBackgroundPageFunction::OnPageLoaded(ExtensionHost* host) { |
| 60 SendResponse(true); | 60 if (host) |
|
Yoyo Zhou
2012/04/13 20:43:52
If not, it looks like the async function will neve
Matt Perry
2012/04/13 21:19:09
Good catch, fixed!
| |
| 61 SendResponse(true); | |
| 61 } | 62 } |
| 62 | 63 |
| 63 } // namespace extensions | 64 } // namespace extensions |
| OLD | NEW |