Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: extensions/browser/extension_function.h

Issue 670173002: Fix webrequest api for webview in webui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/extension_function.h
diff --git a/extensions/browser/extension_function.h b/extensions/browser/extension_function.h
index f4ffaa273afe5e96007c9a93b7eed5444f87844a..a0b97bc8123b831a663363c0765d46b669033dc3 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();
not at google - send to devlin 2014/10/22 15:36:15 I actually deliberately left it the way it was so
guohui 2014/10/22 18:46:06 Done.
+ }
void set_request_id(int request_id) { request_id_ = request_id; }
int request_id() { return request_id_; }

Powered by Google App Engine
This is Rietveld 408576698