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

Unified Diff: chrome/common/extensions/user_script.h

Issue 1585013: Localize CSS files in content scripts (but don't localize JS files).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome/chrome_tests.gypi ('k') | chrome/renderer/mock_render_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script.h
===================================================================
--- chrome/common/extensions/user_script.h (revision 43656)
+++ chrome/common/extensions/user_script.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,13 +62,13 @@
// If external_content_ is set returns it as content otherwise it returns
// content_
const base::StringPiece GetContent() const {
- if (external_content_.data())
+ if (!external_content_.empty())
return external_content_;
else
return content_;
}
void set_external_content(const base::StringPiece& content) {
- external_content_ = content;
+ external_content_.assign(content.begin(), content.end());
}
void set_content(const base::StringPiece& content) {
content_.assign(content.begin(), content.end());
@@ -90,7 +90,7 @@
// The script content. It can be set to either loaded_content_ or
// externally allocated string.
- base::StringPiece external_content_;
+ std::string external_content_;
// Set when the content is loaded by LoadContent
std::string content_;
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/renderer/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698