Index: extensions/browser/extension_function.h |
diff --git a/extensions/browser/extension_function.h b/extensions/browser/extension_function.h |
index 43cb6111a699575ec2d56fd2a8249c5a6ebb127b..95d831d62b5c3b4219ee8221a71a048b3778b2cc 100644 |
--- a/extensions/browser/extension_function.h |
+++ b/extensions/browser/extension_function.h |
@@ -15,6 +15,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/process/process.h" |
#include "base/sequenced_task_runner_helpers.h" |
+#include "base/strings/string_util.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/common/console_message_level.h" |
#include "extensions/browser/extension_function_histogram_value.h" |
@@ -218,7 +219,9 @@ class ExtensionFunction |
extension_ = extension; |
} |
const extensions::Extension* extension() const { return extension_.get(); } |
- const std::string& extension_id() const { return extension_->id(); } |
+ std::string extension_id() const { |
+ return extension_ ? extension_->id() : base::EmptyString(); |
Fady Samuel
2014/10/21 21:32:57
I think Ben Kalman should review this change. It m
guohui
2014/10/22 15:35:33
Done.
|
+ } |
void set_request_id(int request_id) { request_id_ = request_id; } |
int request_id() { return request_id_; } |