Skip to content

Commit

Permalink
chrome 6: string_util.h -> utf_string_conversions.h fix.
Browse files Browse the repository at this point in the history
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/671025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40964 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jhawkins@chromium.org committed Mar 8, 2010
1 parent 9fd9092 commit 64048bd
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 16 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/download/download_item_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "app/l10n_util.h"
#include "base/i18n/number_formatting.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/save_package.h"
#include "chrome/common/time_format.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/download/download_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "base/file_util.h"
#include "base/gfx/rect.h"
#include "base/i18n/time_formatting.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_item_model.h"
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/download/save_package.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/string_piece.h"
#include "base/utf_string_conversions.h"
#include "base/task.h"
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/encoding_menu_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "chrome/browser/encoding_menu_controller.h"

#include "app/l10n_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/character_encoding.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/language_combobox_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chrome/browser/language_combobox_model.h"

#include "app/l10n_util.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/pref_service.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/memory_details.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "app/l10n_util.h"
#include "base/file_version_info.h"
#include "base/process_util.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/child_process_host.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/renderer_host/backing_store_manager.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/process_singleton_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
#include "base/process_util.h"
#include "base/safe_strerror_posix.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "base/time.h"
#include "base/timer.h"
#include "chrome/browser/browser_init.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "chrome/browser/search_engines/edit_search_engine_controller.h"

#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/profile.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/search_engines/template_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "app/l10n_util.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google_url_tracker.h"
#include "chrome/browser/search_engines/template_url_model.h"
Expand Down
16 changes: 9 additions & 7 deletions chrome/browser/search_engines/template_url_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

#include "chrome/browser/search_engines/template_url_parser.h"

#include <algorithm>
#include <map>
#include <vector>

#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/common/url_constants.h"
#include "googleurl/src/gurl.h"
Expand Down Expand Up @@ -205,7 +207,7 @@ class ParsingContext {

private:
static void InitMapping() {
kElementNameToElementTypeMap = new std::map<std::string,ElementType>;
kElementNameToElementTypeMap = new std::map<std::string, ElementType>;
(*kElementNameToElementTypeMap)[kURLElement] = URL;
(*kElementNameToElementTypeMap)[kParamElement] = PARAM;
(*kElementNameToElementTypeMap)[kShortNameElement] = SHORT_NAME;
Expand All @@ -222,7 +224,7 @@ class ParsingContext {
}

// Key is UTF8 encoded.
static std::map<std::string,ElementType>* kElementNameToElementTypeMap;
static std::map<std::string, ElementType>* kElementNameToElementTypeMap;
// TemplateURL supplied to Read method. It's owned by the caller, so we
// don't need to free it.
TemplateURL* url_;
Expand Down Expand Up @@ -253,7 +255,7 @@ class ParsingContext {
};

// static
std::map<std::string,ParsingContext::ElementType>*
std::map<std::string, ParsingContext::ElementType>*
ParsingContext::kElementNameToElementTypeMap = NULL;

std::wstring XMLCharToWide(const xmlChar* value) {
Expand Down Expand Up @@ -385,10 +387,10 @@ static void AppendParamToQuery(const std::string& key,
const std::string& value,
std::string* query) {
if (!query->empty())
query->append("&");
query->append("&");
if (!key.empty()) {
query->append(key);
query->append("=");
query->append(key);
query->append("=");
}
query->append(value);
}
Expand Down Expand Up @@ -548,7 +550,7 @@ bool IsLegal(TemplateURL* url) {
return true;
}

} // namespace
} // namespace

// static
bool TemplateURLParser::Parse(const unsigned char* data, size_t length,
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/search_engines/template_url_table_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

#include "chrome/browser/search_engines/template_url_table_model.h"

#include <vector>

#include "app/gfx/codec/png_codec.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/table_model_observer.h"
#include "base/callback.h"
#include "base/stl_util-inl.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/favicon_service.h"
#include "chrome/browser/profile.h"
#include "grit/app_resources.h"
Expand Down
1 change: 1 addition & 0 deletions chrome/browser/search_engines/template_url_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "base/base_paths.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/rlz/rlz.h"
#include "chrome/browser/search_engines/template_url.h"
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/shell_integration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/browser/chrome_thread.h"
Expand Down Expand Up @@ -43,7 +44,7 @@ std::string ShellIntegration::GetCommandLineArgumentsCommon(const GURL& url,
arguments_w += std::wstring(L"--") + ASCIIToWide(switches::kAppId) +
L"=\"" + ASCIIToWide(UTF16ToASCII(extension_app_id)) + L"\" --" +
ASCIIToWide(switches::kEnableExtensionApps);
} else {
} else {
// Use '--app=url' instead of just 'url' to launch the browser with minimal
// chrome.
// Note: Do not change this flag! Old Gears shortcuts will break if you do!
Expand Down
3 changes: 2 additions & 1 deletion chrome/renderer/spellchecker/spellcheck_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/path_service.h"
#include "base/platform_file.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/spellcheck_common.h"
Expand Down Expand Up @@ -357,7 +358,7 @@ TEST_F(SpellCheckTest, SpellCheckSuggestions_EN_US) {

// Check if the suggested words occur.
bool suggested_word_is_present = false;
for (int j=0; j < static_cast<int>(suggestions.size()); j++) {
for (int j = 0; j < static_cast<int>(suggestions.size()); j++) {
if (suggestions.at(j).compare(WideToUTF16(kTestCases[i].suggested_word))
== 0) {
suggested_word_is_present = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "base/format_macros.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/renderer/spellchecker/spellcheck_worditerator.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

#include "app/l10n_util.h"
#include "base/i18n/number_formatting.h"
#include "base/utf_string_conversions.h"
#include "grit/generated_resources.h"
#include "net/base/net_util.h"

Expand Down
1 change: 1 addition & 0 deletions chrome/tools/convert_dict/aff_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/file_util.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/tools/convert_dict/hunspell_reader.h"

namespace convert_dict {
Expand Down
1 change: 1 addition & 0 deletions chrome/tools/convert_dict/convert_dict_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/format_macros.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/tools/convert_dict/aff_reader.h"
#include "chrome/tools/convert_dict/dic_reader.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down

0 comments on commit 64048bd

Please sign in to comment.