summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_bookmarks_module.cc
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 02:29:30 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 02:29:30 +0000
commit315e7d45e23bc4db2a56b4954b8343ef17676ac5 (patch)
treeb6213f52635a062df2f2fe3302e37f881a118ad6 /chrome/browser/extensions/extension_bookmarks_module.cc
parentc9b6a65a0bf384651604e3d4e8625ae0483bf8e9 (diff)
downloadchromium_src-315e7d45e23bc4db2a56b4954b8343ef17676ac5.zip
chromium_src-315e7d45e23bc4db2a56b4954b8343ef17676ac5.tar.gz
chromium_src-315e7d45e23bc4db2a56b4954b8343ef17676ac5.tar.bz2
Convert wide string constants in extension_bookmarks_module_constants.
BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3169011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_bookmarks_module.cc')
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index b819217..b8f9119 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -7,6 +7,7 @@
#include "base/json/json_writer.h"
#include "base/sha1.h"
#include "base/stl_util-inl.h"
+#include "base/string16.h"
#include "base/string_number_conversions.h"
#include "chrome/browser/bookmarks/bookmark_codec.h"
#include "chrome/browser/bookmarks/bookmark_html_writer.h"
@@ -171,7 +172,7 @@ void ExtensionBookmarkEventRouter::BookmarkNodeChanged(
// for now we only include title and url. The ideal thing would be to change
// BookmarkModel to indicate what changed.
DictionaryValue* object_args = new DictionaryValue();
- object_args->SetString(keys::kTitleKey, node->GetTitle());
+ object_args->SetString(keys::kTitleKey, node->GetTitleAsString16());
if (node->is_url())
object_args->SetString(keys::kUrlKey, node->GetURL().spec());
args.Append(object_args);
@@ -416,7 +417,7 @@ bool CreateBookmarkFunction::RunImpl() {
}
}
- std::wstring title;
+ string16 title;
json->GetString(keys::kTitleKey, &title); // Optional.
std::string url_string;
json->GetString(keys::kUrlKey, &url_string); // Optional.
@@ -544,7 +545,7 @@ bool UpdateBookmarkFunction::RunImpl() {
DictionaryValue* updates;
EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(1, &updates));
- std::wstring title;
+ string16 title;
std::string url_string;
// Optional but we need to distinguish non present from an empty title.
@@ -628,12 +629,12 @@ class CreateBookmarkBucketMapper : public BookmarkBucketMapper<std::string> {
return;
std::string bucket_id = WideToUTF8(parent->GetTitle());
- std::wstring title;
+ std::string title;
json->GetString(keys::kTitleKey, &title);
std::string url_string;
json->GetString(keys::kUrlKey, &url_string);
- bucket_id += WideToUTF8(title);
+ bucket_id += title;
bucket_id += url_string;
// 20 bytes (SHA1 hash length) is very likely less than most of the
// |bucket_id| strings we construct here, so we hash it to save space.