diff options
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r-- | chrome/common/extensions/user_script.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h index de5ff76..ed84009 100644 --- a/chrome/common/extensions/user_script.h +++ b/chrome/common/extensions/user_script.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright 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 @@ class UserScript { // If external_content_ is set returns it as content otherwise it returns // content_ const base::StringPiece GetContent() const { - if (!external_content_.empty()) + if (external_content_.data()) return external_content_; else return content_; } void set_external_content(const base::StringPiece& content) { - external_content_.assign(content.begin(), content.end()); + external_content_ = content; } void set_content(const base::StringPiece& content) { content_.assign(content.begin(), content.end()); @@ -90,7 +90,7 @@ class UserScript { // The script content. It can be set to either loaded_content_ or // externally allocated string. - std::string external_content_; + base::StringPiece external_content_; // Set when the content is loaded by LoadContent std::string content_; |