diff options
20 files changed, 52 insertions, 19 deletions
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc index f874dab..9a1e614 100644 --- a/chrome/browser/dom_ui/dom_ui.cc +++ b/chrome/browser/dom_ui/dom_ui.cc @@ -7,7 +7,7 @@ #include "app/l10n_util.h" #include "base/json/json_writer.h" #include "base/stl_util-inl.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc index 9e82aec6..5ce3c18 100644 --- a/chrome/browser/dom_ui/most_visited_handler.cc +++ b/chrome/browser/dom_ui/most_visited_handler.cc @@ -4,11 +4,13 @@ #include "chrome/browser/dom_ui/most_visited_handler.h" +#include <set> + #include "app/l10n_util.h" #include "base/callback.h" #include "base/md5.h" #include "base/singleton.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/thread.h" #include "base/values.h" #include "chrome/browser/chrome_thread.h" @@ -67,7 +69,8 @@ DOMMessageHandler* MostVisitedHandler::Attach(DOMUI* dom_ui) { &ChromeURLDataManager::AddDataSource, make_scoped_refptr(thumbnail_src))); - DOMUIFavIconSource* favicon_src = new DOMUIFavIconSource(dom_ui->GetProfile()); + DOMUIFavIconSource* favicon_src = + new DOMUIFavIconSource(dom_ui->GetProfile()); ChromeThread::PostTask( ChromeThread::IO, FROM_HERE, NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), @@ -190,7 +193,7 @@ void MostVisitedHandler::HandleAddPinnedURL(const Value* value) { } const ListValue* list = static_cast<const ListValue*>(value); - DCHECK(list->GetSize() == 5) << "Wrong number of params to addPinnedURL"; + DCHECK_EQ(5U, list->GetSize()) << "Wrong number of params to addPinnedURL"; MostVisitedPage mvp; std::string tmp_string; int index; diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc index 0d0fc06..ee14883 100644 --- a/chrome/browser/dom_ui/ntp_resource_cache.cc +++ b/chrome/browser/dom_ui/ntp_resource_cache.cc @@ -4,6 +4,9 @@ #include "chrome/browser/dom_ui/ntp_resource_cache.h" +#include <algorithm> +#include <vector> + #include "app/animation.h" #include "app/gfx/color_utils.h" #include "app/l10n_util.h" @@ -12,7 +15,7 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/ref_counted_memory.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/chrome_thread.h" diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc index eb94eeb..6f21df4 100644 --- a/chrome/browser/dom_ui/tips_handler.cc +++ b/chrome/browser/dom_ui/tips_handler.cc @@ -6,7 +6,7 @@ #include "app/l10n_util.h" #include "base/callback.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/dom_ui/tips_handler.h" diff --git a/chrome/browser/geolocation/network_location_provider_unittest.cc b/chrome/browser/geolocation/network_location_provider_unittest.cc index 8042a99..b14da95 100644 --- a/chrome/browser/geolocation/network_location_provider_unittest.cc +++ b/chrome/browser/geolocation/network_location_provider_unittest.cc @@ -6,7 +6,7 @@ #include "base/json/json_reader.h" #include "base/scoped_ptr.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/geolocation/fake_access_token_store.h" #include "chrome/browser/net/test_url_fetcher_factory.h" diff --git a/chrome/browser/geolocation/wifi_data_provider_common.cc b/chrome/browser/geolocation/wifi_data_provider_common.cc index 307325f..a4c6a69 100644 --- a/chrome/browser/geolocation/wifi_data_provider_common.cc +++ b/chrome/browser/geolocation/wifi_data_provider_common.cc @@ -4,7 +4,7 @@ #include "chrome/browser/geolocation/wifi_data_provider_common.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" string16 MacAddressAsString16(const uint8 mac_as_int[6]) { // mac_as_int is big-endian. Write in byte chunks. diff --git a/chrome/browser/google_url_tracker.cc b/chrome/browser/google_url_tracker.cc index 07f7103d..a4428c3 100644 --- a/chrome/browser/google_url_tracker.cc +++ b/chrome/browser/google_url_tracker.cc @@ -4,8 +4,11 @@ #include "chrome/browser/google_url_tracker.h" +#include <vector> + #include "base/compiler_specific.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/history/snippet.cc b/chrome/browser/history/snippet.cc index b44bb00..95b66cd 100644 --- a/chrome/browser/history/snippet.cc +++ b/chrome/browser/history/snippet.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "base/scoped_ptr.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "unicode/brkiter.h" #include "unicode/utext.h" #include "unicode/utf8.h" @@ -60,8 +61,8 @@ void AddMatch(size_t start, // coalesce matches after it. i->second = end; CoalescePositionsFrom(i - match_positions->begin(), match_positions); - } // else case, new pair completely contained in existing pair, nothing - // to do. + } // else case, new pair completely contained in existing pair, nothing + // to do. } else if (i == match_positions->begin()) { // Match at the beginning and the first pair doesn't have the same // start. Insert new pair and coalesce matches after it. diff --git a/chrome/browser/history/snippet_unittest.cc b/chrome/browser/history/snippet_unittest.cc index aa9aa2e..aa3b888 100644 --- a/chrome/browser/history/snippet_unittest.cc +++ b/chrome/browser/history/snippet_unittest.cc @@ -7,6 +7,7 @@ #include <algorithm> #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc index c92c054..3ee835a 100644 --- a/chrome/browser/history/text_database.cc +++ b/chrome/browser/history/text_database.cc @@ -4,6 +4,7 @@ #include <limits> #include <set> +#include <string> #include "chrome/browser/history/text_database.h" @@ -14,6 +15,7 @@ #include "base/histogram.h" #include "base/logging.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/diagnostics/sqlite_diagnostics.h" // There are two tables in each database, one full-text search (FTS) table which diff --git a/chrome/browser/history/text_database_manager.cc b/chrome/browser/history/text_database_manager.cc index 0b27203..451c033 100644 --- a/chrome/browser/history/text_database_manager.cc +++ b/chrome/browser/history/text_database_manager.cc @@ -4,12 +4,15 @@ #include "chrome/browser/history/text_database_manager.h" +#include <string> + #include "base/compiler_specific.h" #include "base/file_util.h" #include "base/histogram.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/history/history_publisher.h" #include "chrome/browser/history/visit_database.h" #include "chrome/common/mru_cache.h" @@ -367,7 +370,7 @@ void TextDatabaseManager::DeleteFromUncommitted( } void TextDatabaseManager::DeleteAll() { - DCHECK(transaction_nesting_ == 0) << "Calling deleteAll in a transaction."; + DCHECK_EQ(0, transaction_nesting_) << "Calling deleteAll in a transaction."; InitDBList(); diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc index 32c05de..c94de8a 100644 --- a/chrome/browser/history/text_database_unittest.cc +++ b/chrome/browser/history/text_database_unittest.cc @@ -2,10 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <string> + #include "base/file_util.h" #include "base/path_service.h" #include "base/scoped_ptr.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/history/text_database.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc index 0a9115f..27eabd3 100644 --- a/chrome/browser/history/url_database.cc +++ b/chrome/browser/history/url_database.cc @@ -6,11 +6,13 @@ #include <algorithm> #include <limits> +#include <string> +#include <vector> #include "app/l10n_util.h" #include "app/sql/connection.h" #include "app/sql/statement.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/common/url_constants.h" #include "googleurl/src/gurl.h" @@ -80,7 +82,7 @@ URLID URLDatabase::GetRowForURL(const GURL& url, history::URLRow* info) { std::string url_string = GURLToDatabaseURL(url); statement.BindString(0, url_string); if (!statement.Step()) - return 0; // no data + return 0; // no data if (info) FillURLRow(statement, info); diff --git a/chrome/browser/history/visitsegment_database.cc b/chrome/browser/history/visitsegment_database.cc index 27e0387..f94d713 100644 --- a/chrome/browser/history/visitsegment_database.cc +++ b/chrome/browser/history/visitsegment_database.cc @@ -6,11 +6,16 @@ #include <math.h> +#include <algorithm> +#include <string> +#include <vector> + #include "app/sql/connection.h" #include "app/sql/statement.h" #include "base/logging.h" #include "base/stl_util-inl.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/history/page_usage_data.h" // The following tables are used to store url segment information. @@ -335,7 +340,7 @@ void VisitSegmentDatabase::SetSegmentPresentationIndex(SegmentID segment_id, if (!statement.Run()) NOTREACHED(); else - DCHECK(GetDB().GetLastChangeCount() == 1); + DCHECK_EQ(1, GetDB().GetLastChangeCount()); } bool VisitSegmentDatabase::DeleteSegmentForURL(URLID url_id) { diff --git a/chrome/browser/input_window_dialog_gtk.cc b/chrome/browser/input_window_dialog_gtk.cc index c3f7b04..1a00312 100644 --- a/chrome/browser/input_window_dialog_gtk.cc +++ b/chrome/browser/input_window_dialog_gtk.cc @@ -8,7 +8,8 @@ #include "base/message_loop.h" #include "base/scoped_ptr.h" -#include "base/string_util.h" +#include "base/string_piece.h" +#include "base/utf_string_conversions.h" class GtkInputWindowDialog : public InputWindowDialog { public: diff --git a/chrome/browser/page_state.cc b/chrome/browser/page_state.cc index c9e253e..26b6daf 100644 --- a/chrome/browser/page_state.cc +++ b/chrome/browser/page_state.cc @@ -2,9 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <string> + #include "base/basictypes.h" #include "base/logging.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/page_state.h" #include "chrome/common/json_value_serializer.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/password_manager/encryptor_linux.cc b/chrome/browser/password_manager/encryptor_linux.cc index cc0fa23..44ed207 100644 --- a/chrome/browser/password_manager/encryptor_linux.cc +++ b/chrome/browser/password_manager/encryptor_linux.cc @@ -5,7 +5,7 @@ #include "chrome/browser/password_manager/encryptor.h" #include "base/logging.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" bool Encryptor::EncryptString16(const string16& plaintext, std::string* ciphertext) { diff --git a/chrome/browser/password_manager/encryptor_unittest.cc b/chrome/browser/password_manager/encryptor_unittest.cc index 45a193f..29e518d8 100644 --- a/chrome/browser/password_manager/encryptor_unittest.cc +++ b/chrome/browser/password_manager/encryptor_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc index e7b49b2..069ec4c 100644 --- a/chrome/browser/password_manager/password_manager.cc +++ b/chrome/browser/password_manager/password_manager.cc @@ -4,10 +4,12 @@ #include "chrome/browser/password_manager/password_manager.h" +#include <vector> + #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/stl_util-inl.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/password_manager/password_form_manager.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" @@ -37,7 +39,7 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate { form_to_save_(form_to_save) { } - virtual ~SavePasswordInfoBarDelegate() { } + virtual ~SavePasswordInfoBarDelegate() { } // Overridden from ConfirmInfoBarDelegate: virtual void InfoBarClosed() { diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc index 31e41ae..f30e90b 100644 --- a/chrome/browser/web_resource/web_resource_service.cc +++ b/chrome/browser/web_resource/web_resource_service.cc @@ -4,8 +4,8 @@ #include "chrome/browser/web_resource/web_resource_service.h" #include "base/command_line.h" -#include "base/string_util.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" |