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

Unified Diff: extensions/renderer/script_context.cc

Issue 327953002: Make MessagingBindings use ScriptContextSet::ForEach (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ForEach shortcuts Created 6 years, 6 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
« no previous file with comments | « extensions/renderer/script_context.h ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index b4eeefd007e3e998ff7716083a31b3613a62596c..60a558b6c37fd21e6d9576f1e6f9f57476195d0c 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
#include "base/values.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_view.h"
@@ -58,8 +59,8 @@ void ScriptContext::Invalidate() {
v8_context_.reset();
}
-std::string ScriptContext::GetExtensionID() const {
- return extension_.get() ? extension_->id() : std::string();
+const std::string& ScriptContext::GetExtensionID() const {
+ return extension_.get() ? extension_->id() : base::EmptyString();
}
content::RenderView* ScriptContext::GetRenderView() const {
« no previous file with comments | « extensions/renderer/script_context.h ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698