summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_bookmark_helpers.cc6
-rw-r--r--chrome/browser/extensions/extension_bookmark_manager_api.cc6
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc31
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc7
-rw-r--r--chrome/browser/extensions/extension_clipboard_api.cc6
-rw-r--r--chrome/browser/extensions/extension_context_menu_api.cc10
-rw-r--r--chrome/browser/extensions/extension_history_api.cc10
-rw-r--r--chrome/browser/extensions/extension_infobar_module.cc3
-rw-r--r--chrome/browser/extensions/extension_page_actions_module.cc10
-rw-r--r--chrome/browser/extensions/extension_prefs.cc6
-rw-r--r--chrome/browser/extensions/extension_prefs_unittest.cc13
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc11
-rw-r--r--chrome/browser/extensions/extension_updater.cc8
-rw-r--r--chrome/browser/extensions/extension_updater_unittest.cc5
14 files changed, 74 insertions, 58 deletions
diff --git a/chrome/browser/extensions/extension_bookmark_helpers.cc b/chrome/browser/extensions/extension_bookmark_helpers.cc
index f648a5e..a41c340 100644
--- a/chrome/browser/extensions/extension_bookmark_helpers.cc
+++ b/chrome/browser/extensions/extension_bookmark_helpers.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/extensions/extension_bookmark_helpers.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/extensions/extension_bookmarks_module_constants.h"
namespace keys = extension_bookmarks_module_constants;
@@ -16,11 +16,11 @@ DictionaryValue* GetNodeDictionary(const BookmarkNode* node,
bool recurse,
bool only_folders) {
DictionaryValue* dict = new DictionaryValue();
- dict->SetString(keys::kIdKey, Int64ToString(node->id()));
+ dict->SetString(keys::kIdKey, base::Int64ToString(node->id()));
const BookmarkNode* parent = node->GetParent();
if (parent) {
- dict->SetString(keys::kParentIdKey, Int64ToString(parent->id()));
+ dict->SetString(keys::kParentIdKey, base::Int64ToString(parent->id()));
dict->SetInteger(keys::kIndexKey, parent->IndexOfChild(node));
}
diff --git a/chrome/browser/extensions/extension_bookmark_manager_api.cc b/chrome/browser/extensions/extension_bookmark_manager_api.cc
index 9b796d2..2cbc471 100644
--- a/chrome/browser/extensions/extension_bookmark_manager_api.cc
+++ b/chrome/browser/extensions/extension_bookmark_manager_api.cc
@@ -8,7 +8,7 @@
#include "app/l10n_util.h"
#include "base/json/json_writer.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/bookmarks/bookmark_drag_data.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -77,10 +77,10 @@ void AddNodeToList(ListValue* list, const BookmarkNode& node) {
// Add id and parentId so we can associate the data with existing nodes on the
// client side.
- std::string id_string = Int64ToString(node.id());
+ std::string id_string = base::Int64ToString(node.id());
dict->SetString(keys::kIdKey, id_string);
- std::string parent_id_string = Int64ToString(node.GetParent()->id());
+ std::string parent_id_string = base::Int64ToString(node.GetParent()->id());
dict->SetString(keys::kParentIdKey, parent_id_string);
if (node.is_url())
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index 0eb7a30..b819217 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -7,7 +7,7 @@
#include "base/json/json_writer.h"
#include "base/sha1.h"
#include "base/stl_util-inl.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/bookmarks/bookmark_codec.h"
#include "chrome/browser/bookmarks/bookmark_html_writer.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -56,7 +56,7 @@ void BookmarksFunction::Run() {
bool BookmarksFunction::GetBookmarkIdAsInt64(
const std::string& id_string, int64* id) {
- if (StringToInt64(id_string, id))
+ if (base::StringToInt64(id_string, id))
return true;
error_ = keys::kInvalidIdError;
@@ -112,12 +112,13 @@ void ExtensionBookmarkEventRouter::BookmarkNodeMoved(
int new_index) {
ListValue args;
const BookmarkNode* node = new_parent->GetChild(new_index);
- args.Append(new StringValue(Int64ToString(node->id())));
+ args.Append(new StringValue(base::Int64ToString(node->id())));
DictionaryValue* object_args = new DictionaryValue();
- object_args->SetString(keys::kParentIdKey, Int64ToString(new_parent->id()));
+ object_args->SetString(keys::kParentIdKey,
+ base::Int64ToString(new_parent->id()));
object_args->SetInteger(keys::kIndexKey, new_index);
object_args->SetString(keys::kOldParentIdKey,
- Int64ToString(old_parent->id()));
+ base::Int64ToString(old_parent->id()));
object_args->SetInteger(keys::kOldIndexKey, old_index);
args.Append(object_args);
@@ -131,7 +132,7 @@ void ExtensionBookmarkEventRouter::BookmarkNodeAdded(BookmarkModel* model,
int index) {
ListValue args;
const BookmarkNode* node = parent->GetChild(index);
- args.Append(new StringValue(Int64ToString(node->id())));
+ args.Append(new StringValue(base::Int64ToString(node->id())));
DictionaryValue* obj =
extension_bookmark_helpers::GetNodeDictionary(node, false, false);
args.Append(obj);
@@ -147,9 +148,10 @@ void ExtensionBookmarkEventRouter::BookmarkNodeRemoved(
int index,
const BookmarkNode* node) {
ListValue args;
- args.Append(new StringValue(Int64ToString(node->id())));
+ args.Append(new StringValue(base::Int64ToString(node->id())));
DictionaryValue* object_args = new DictionaryValue();
- object_args->SetString(keys::kParentIdKey, Int64ToString(parent->id()));
+ object_args->SetString(keys::kParentIdKey,
+ base::Int64ToString(parent->id()));
object_args->SetInteger(keys::kIndexKey, index);
args.Append(object_args);
@@ -161,7 +163,7 @@ void ExtensionBookmarkEventRouter::BookmarkNodeRemoved(
void ExtensionBookmarkEventRouter::BookmarkNodeChanged(
BookmarkModel* model, const BookmarkNode* node) {
ListValue args;
- args.Append(new StringValue(Int64ToString(node->id())));
+ args.Append(new StringValue(base::Int64ToString(node->id())));
// TODO(erikkay) The only three things that BookmarkModel sends this
// notification for are title, url and favicon. Since we're currently
@@ -187,12 +189,12 @@ void ExtensionBookmarkEventRouter::BookmarkNodeFavIconLoaded(
void ExtensionBookmarkEventRouter::BookmarkNodeChildrenReordered(
BookmarkModel* model, const BookmarkNode* node) {
ListValue args;
- args.Append(new StringValue(Int64ToString(node->id())));
+ args.Append(new StringValue(base::Int64ToString(node->id())));
int childCount = node->GetChildCount();
ListValue* children = new ListValue();
for (int i = 0; i < childCount; ++i) {
const BookmarkNode* child = node->GetChild(i);
- Value* child_id = new StringValue(Int64ToString(child->id()));
+ Value* child_id = new StringValue(base::Int64ToString(child->id()));
children->Append(child_id);
}
DictionaryValue* reorder_info = new DictionaryValue();
@@ -347,7 +349,7 @@ bool RemoveBookmarkFunction::ExtractIds(const ListValue* args,
if (!args->GetString(0, &id_string))
return false;
int64 id;
- if (StringToInt64(id_string, &id))
+ if (base::StringToInt64(id_string, &id))
ids->push_back(id);
else
*invalid_id = true;
@@ -618,7 +620,10 @@ class CreateBookmarkBucketMapper : public BookmarkBucketMapper<std::string> {
return;
}
BookmarkModel* model = profile_->GetBookmarkModel();
- const BookmarkNode* parent = model->GetNodeByID(StringToInt64(parent_id));
+
+ int64 parent_id_int64;
+ base::StringToInt64(parent_id, &parent_id_int64);
+ const BookmarkNode* parent = model->GetNodeByID(parent_id_int64);
if (!parent)
return;
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index dedcf8f..a30f352 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -9,7 +9,7 @@
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/path_service.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/location_bar.h"
@@ -147,8 +147,9 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
size_t num_after = service->extensions()->size();
if (num_after != (num_before + expected_change)) {
- std::cout << "Num extensions before: " << IntToString(num_before) << " "
- << "num after: " << IntToString(num_after) << " "
+ std::cout << "Num extensions before: "
+ << base::IntToString(num_before) << " "
+ << "num after: " << base::IntToString(num_after) << " "
<< "Installed extensions follow:\n";
for (size_t i = 0; i < service->extensions()->size(); ++i)
diff --git a/chrome/browser/extensions/extension_clipboard_api.cc b/chrome/browser/extensions/extension_clipboard_api.cc
index 22a6253..af1deae 100644
--- a/chrome/browser/extensions/extension_clipboard_api.cc
+++ b/chrome/browser/extensions/extension_clipboard_api.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/extensions/extension_clipboard_api.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/renderer_host/render_view_host.h"
@@ -23,8 +23,8 @@ bool ClipboardFunction::RunImpl() {
TabContents* contents = NULL;
if (!ExtensionTabUtil::GetTabById(tab_id, profile(), include_incognito(),
NULL, NULL, &contents, NULL)) {
- error_ = ExtensionErrorUtils::FormatErrorMessage(kNoTabError,
- IntToString(tab_id));
+ error_ = ExtensionErrorUtils::FormatErrorMessage(
+ kNoTabError, base::IntToString(tab_id));
return false;
}
diff --git a/chrome/browser/extensions/extension_context_menu_api.cc b/chrome/browser/extensions/extension_context_menu_api.cc
index 9b7a3a8..356a43c 100644
--- a/chrome/browser/extensions/extension_context_menu_api.cc
+++ b/chrome/browser/extensions/extension_context_menu_api.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/values.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/profile.h"
@@ -188,7 +189,8 @@ bool ExtensionContextMenuFunction::GetParent(
ExtensionMenuItem* parent = manager.GetItemById(parent_id);
if (!parent) {
- error_ = "Cannot find menu item with id " + IntToString(parent_id.second);
+ error_ = "Cannot find menu item with id " +
+ base::IntToString(parent_id.second);
return false;
}
if (parent->type() != ExtensionMenuItem::NORMAL) {
@@ -246,7 +248,7 @@ bool CreateContextMenuFunction::RunImpl() {
ExtensionMenuItem* parent = menu_manager->GetItemById(parent_id);
if (!parent) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
- kCannotFindItemError, IntToString(parent_id.second));
+ kCannotFindItemError, base::IntToString(parent_id.second));
return false;
}
if (parent->type() != ExtensionMenuItem::NORMAL) {
@@ -273,7 +275,7 @@ bool UpdateContextMenuFunction::RunImpl() {
ExtensionMenuItem* item = manager->GetItemById(item_id);
if (!item || item->extension_id() != extension_id()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
- kCannotFindItemError, IntToString(item_id.second));
+ kCannotFindItemError, base::IntToString(item_id.second));
return false;
}
@@ -341,7 +343,7 @@ bool RemoveContextMenuFunction::RunImpl() {
// Ensure one extension can't remove another's menu items.
if (!item || item->extension_id() != extension_id()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
- kCannotFindItemError, IntToString(id.second));
+ kCannotFindItemError, base::IntToString(id.second));
return false;
}
diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc
index 23f861f..0b891c8 100644
--- a/chrome/browser/extensions/extension_history_api.cc
+++ b/chrome/browser/extensions/extension_history_api.cc
@@ -7,7 +7,7 @@
#include "base/callback.h"
#include "base/json/json_writer.h"
#include "base/message_loop.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "base/task.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_history_api_constants.h"
@@ -28,7 +28,7 @@ double MilliSecondsFromTime(const base::Time& time) {
void GetHistoryItemDictionary(const history::URLRow& row,
DictionaryValue* value) {
- value->SetString(keys::kIdKey, Int64ToString(row.id()));
+ value->SetString(keys::kIdKey, base::Int64ToString(row.id()));
value->SetString(keys::kUrlKey, row.url().spec());
value->SetStringFromUTF16(keys::kTitleKey, row.title());
value->SetReal(keys::kLastVisitdKey, MilliSecondsFromTime(row.last_visit()));
@@ -44,11 +44,11 @@ void AddHistoryNode(const history::URLRow& row, ListValue* list) {
void GetVisitInfoDictionary(const history::VisitRow& row,
DictionaryValue* value) {
- value->SetString(keys::kIdKey, Int64ToString(row.url_id));
- value->SetString(keys::kVisitId, Int64ToString(row.visit_id));
+ value->SetString(keys::kIdKey, base::Int64ToString(row.url_id));
+ value->SetString(keys::kVisitId, base::Int64ToString(row.visit_id));
value->SetReal(keys::kVisitTime, MilliSecondsFromTime(row.visit_time));
value->SetString(keys::kReferringVisitId,
- Int64ToString(row.referring_visit));
+ base::Int64ToString(row.referring_visit));
const char* trans = PageTransition::CoreTransitionString(row.transition);
DCHECK(trans) << "Invalid transition.";
diff --git a/chrome/browser/extensions/extension_infobar_module.cc b/chrome/browser/extensions/extension_infobar_module.cc
index 8ca5605..2d3e67f 100644
--- a/chrome/browser/extensions/extension_infobar_module.cc
+++ b/chrome/browser/extensions/extension_infobar_module.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/extension_infobar_module.h"
#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_infobar_module_constants.h"
@@ -45,7 +46,7 @@ bool ShowInfoBarFunction::RunImpl() {
NULL)) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
extension_tabs_module_constants::kTabNotFoundError,
- IntToString(tab_id));
+ base::IntToString(tab_id));
return false;
}
diff --git a/chrome/browser/extensions/extension_page_actions_module.cc b/chrome/browser/extensions/extension_page_actions_module.cc
index cdeb892..095cd36 100644
--- a/chrome/browser/extensions/extension_page_actions_module.cc
+++ b/chrome/browser/extensions/extension_page_actions_module.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/extensions/extension_page_actions_module.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/profile.h"
@@ -71,8 +71,8 @@ bool PageActionFunction::SetPageActionEnabled(bool enable) {
bool result = ExtensionTabUtil::GetTabById(
tab_id, profile(), include_incognito(), NULL, NULL, &contents, NULL);
if (!result || !contents) {
- error_ = ExtensionErrorUtils::FormatErrorMessage(kNoTabError,
- IntToString(tab_id));
+ error_ = ExtensionErrorUtils::FormatErrorMessage(
+ kNoTabError, base::IntToString(tab_id));
return false;
}
@@ -104,8 +104,8 @@ bool PageActionFunction::InitCommon(int tab_id) {
bool result = ExtensionTabUtil::GetTabById(
tab_id, profile(), include_incognito(), NULL, NULL, &contents_, NULL);
if (!result || !contents_) {
- error_ = ExtensionErrorUtils::FormatErrorMessage(kNoTabError,
- IntToString(tab_id));
+ error_ = ExtensionErrorUtils::FormatErrorMessage(
+ kNoTabError, base::IntToString(tab_id));
return false;
}
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index ed44ec4..4006120 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "base/string_util.h"
+#include "base/string_number_conversions.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
@@ -317,7 +319,7 @@ void ExtensionPrefs::SetLastPingDayImpl(const Time& time,
NOTREACHED();
return;
}
- std::string value = Int64ToString(time.ToInternalValue());
+ std::string value = base::Int64ToString(time.ToInternalValue());
dictionary->SetString(kLastPingDay, value);
prefs_->ScheduleSavePersistentPrefs();
}
@@ -695,7 +697,7 @@ void ExtensionPrefs::SetIdleInstallInfo(const std::string& extension_id,
info->SetString(kIdleInstallInfoCrxPath, crx_path.value());
info->SetString(kIdleInstallInfoVersion, version);
info->SetString(kIdleInstallInfoFetchTime,
- Int64ToString(fetch_time.ToInternalValue()));
+ base::Int64ToString(fetch_time.ToInternalValue()));
extension_prefs->Set(kIdleInstallInfo, info);
prefs_->ScheduleSavePersistentPrefs();
}
diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc
index 812891b..cd87bbe 100644
--- a/chrome/browser/extensions/extension_prefs_unittest.cc
+++ b/chrome/browser/extensions/extension_prefs_unittest.cc
@@ -6,7 +6,7 @@
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
#include "base/stl_util-inl.h"
-#include "base/string_util.h"
+#include "base/string_number_conversions.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/test_extension_prefs.h"
@@ -172,7 +172,7 @@ class ExtensionPrefsBlacklist : public ExtensionPrefsTest {
// Install 5 extensions.
for (int i = 0; i < 5; i++) {
- std::string name = "test" + IntToString(i);
+ std::string name = "test" + base::IntToString(i);
extensions_.push_back(linked_ptr<Extension>(prefs_.AddExtension(name)));
}
EXPECT_EQ(NULL, prefs()->GetInstalledExtensionInfo(not_installed_id_));
@@ -225,8 +225,9 @@ class ExtensionPrefsIdleInstallInfo : public ExtensionPrefsTest {
public:
// Sets idle install information for one test extension.
void SetIdleInfo(std::string id, int num) {
- prefs()->SetIdleInstallInfo(id, basedir_.AppendASCII(IntToString(num)),
- "1." + IntToString(num),
+ prefs()->SetIdleInstallInfo(id,
+ basedir_.AppendASCII(base::IntToString(num)),
+ "1." + base::IntToString(num),
now_ + TimeDelta::FromSeconds(num));
}
@@ -239,8 +240,8 @@ class ExtensionPrefsIdleInstallInfo : public ExtensionPrefsTest {
ASSERT_TRUE(prefs()->GetIdleInstallInfo(id, &crx_path, &version,
&fetch_time));
ASSERT_EQ(crx_path.value(),
- basedir_.AppendASCII(IntToString(num)).value());
- ASSERT_EQ("1." + IntToString(num), version);
+ basedir_.AppendASCII(base::IntToString(num)).value());
+ ASSERT_EQ("1." + base::IntToString(num), version);
ASSERT_TRUE(fetch_time == now_ + TimeDelta::FromSeconds(num));
}
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index a4b1ee1..4d0d11f 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "base/base64.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
@@ -223,7 +224,7 @@ bool GetWindowFunction::RunImpl() {
include_incognito(), &error_);
if (!browser || !browser->window()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
- keys::kWindowNotFoundError, IntToString(window_id));
+ keys::kWindowNotFoundError, base::IntToString(window_id));
return false;
}
@@ -396,7 +397,7 @@ bool UpdateWindowFunction::RunImpl() {
include_incognito(), &error_);
if (!browser || !browser->window()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
- keys::kWindowNotFoundError, IntToString(window_id));
+ keys::kWindowNotFoundError, base::IntToString(window_id));
return false;
}
@@ -746,7 +747,7 @@ bool MoveTabFunction::RunImpl() {
contents = source_tab_strip->DetachTabContentsAt(tab_index);
if (!contents) {
error_ = ExtensionErrorUtils::FormatErrorMessage(
- keys::kTabNotFoundError, IntToString(tab_id));
+ keys::kTabNotFoundError, base::IntToString(tab_id));
return false;
}
@@ -1060,7 +1061,7 @@ static Browser* GetBrowserInProfileWithId(Profile* profile,
if (error_message)
*error_message = ExtensionErrorUtils::FormatErrorMessage(
- keys::kWindowNotFoundError, IntToString(window_id));
+ keys::kWindowNotFoundError, base::IntToString(window_id));
return NULL;
}
@@ -1078,7 +1079,7 @@ static bool GetTabById(int tab_id, Profile* profile,
if (error_message)
*error_message = ExtensionErrorUtils::FormatErrorMessage(
- keys::kTabNotFoundError, IntToString(tab_id));
+ keys::kTabNotFoundError, base::IntToString(tab_id));
return false;
}
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index 9f21100..f0da90f 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -14,6 +14,7 @@
#include "base/rand_util.h"
#include "base/sha2.h"
#include "base/stl_util-inl.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/time.h"
#include "base/thread.h"
@@ -105,8 +106,8 @@ bool ManifestFetchData::AddExtension(std::string id, std::string version,
parts.push_back("uc");
if (ShouldPing(days)) {
- parts.push_back("ping=" + EscapeQueryParamValue("r=" + IntToString(days),
- true));
+ parts.push_back("ping=" +
+ EscapeQueryParamValue("r=" + base::IntToString(days), true));
}
std::string extra = full_url_.has_query() ? "&" : "?";
@@ -556,7 +557,8 @@ void ExtensionUpdater::ProcessBlacklist(const std::string& data) {
// Verify sha256 hash value.
char sha256_hash_value[base::SHA256_LENGTH];
base::SHA256HashString(data, sha256_hash_value, base::SHA256_LENGTH);
- std::string hash_in_hex = HexEncode(sha256_hash_value, base::SHA256_LENGTH);
+ std::string hash_in_hex = base::HexEncode(sha256_hash_value,
+ base::SHA256_LENGTH);
if (current_extension_fetch_.package_hash != hash_in_hex) {
NOTREACHED() << "Fetched blacklist checksum is not as expected. "
diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc
index 0895501..8f314a9 100644
--- a/chrome/browser/extensions/extension_updater_unittest.cc
+++ b/chrome/browser/extensions/extension_updater_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -8,6 +8,7 @@
#include "base/rand_util.h"
#include "base/scoped_ptr.h"
#include "base/stl_util-inl.h"
+#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "base/version.h"
@@ -767,7 +768,7 @@ class ExtensionUpdaterTest : public testing::Test {
if (ping_days == 0) {
EXPECT_TRUE(url1_query.find(search_string) == std::string::npos);
} else {
- search_string += "%253D" + IntToString(ping_days);
+ search_string += "%253D" + base::IntToString(ping_days);
size_t pos = url1_query.find(search_string);
EXPECT_TRUE(pos != std::string::npos);
}