summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/bidi_line_iterator.cc2
-rw-r--r--app/clipboard/clipboard_linux.cc3
-rw-r--r--app/clipboard/clipboard_unittest.cc3
-rwxr-xr-xapp/gfx/canvas_linux.cc2
-rw-r--r--app/gfx/font_gtk.cc4
-rw-r--r--app/gfx/font_util.cc7
-rw-r--r--app/gfx/text_elider.cc13
-rw-r--r--app/l10n_util_collator.h6
8 files changed, 27 insertions, 13 deletions
diff --git a/app/bidi_line_iterator.cc b/app/bidi_line_iterator.cc
index e58d375..2002c0d 100644
--- a/app/bidi_line_iterator.cc
+++ b/app/bidi_line_iterator.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/string16.h"
-#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
BiDiLineIterator::~BiDiLineIterator() {
if (bidi_) {
diff --git a/app/clipboard/clipboard_linux.cc b/app/clipboard/clipboard_linux.cc
index 740ec76..fbffd98 100644
--- a/app/clipboard/clipboard_linux.cc
+++ b/app/clipboard/clipboard_linux.cc
@@ -12,9 +12,10 @@
#include "base/file_path.h"
#include "base/gfx/size.h"
+#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/linux_util.h"
-#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
namespace {
diff --git a/app/clipboard/clipboard_unittest.cc b/app/clipboard/clipboard_unittest.cc
index a980679..e8c5ee0 100644
--- a/app/clipboard/clipboard_unittest.cc
+++ b/app/clipboard/clipboard_unittest.cc
@@ -14,6 +14,7 @@
#include "base/message_loop.h"
#include "base/pickle.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -44,7 +45,7 @@ bool ClipboardContentsIsExpected(const string16& copied_markup,
#endif
}
-} // namespace
+} // namespace
TEST_F(ClipboardTest, ClearTest) {
Clipboard clipboard;
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc
index 0179577..1b3d824 100755
--- a/app/gfx/canvas_linux.cc
+++ b/app/gfx/canvas_linux.cc
@@ -12,7 +12,7 @@
#include "app/gfx/font.h"
#include "base/gfx/rect.h"
#include "base/logging.h"
-#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
namespace {
diff --git a/app/gfx/font_gtk.cc b/app/gfx/font_gtk.cc
index a47d304..85640b0 100644
--- a/app/gfx/font_gtk.cc
+++ b/app/gfx/font_gtk.cc
@@ -7,7 +7,9 @@
#include <fontconfig/fontconfig.h>
#include <gtk/gtk.h>
-#include "base/string_util.h"
+#include "base/logging.h"
+#include "base/string_piece.h"
+#include "base/utf_string_conversions.h"
namespace gfx {
diff --git a/app/gfx/font_util.cc b/app/gfx/font_util.cc
index 278677c..ec94489 100644
--- a/app/gfx/font_util.cc
+++ b/app/gfx/font_util.cc
@@ -7,6 +7,8 @@
#include "app/gfx/font.h"
#include "app/l10n_util.h"
#include "base/logging.h"
+#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
namespace gfx {
@@ -15,7 +17,7 @@ int GetLocalizedContentsWidthForFont(int col_resource_id,
double chars = 0;
StringToDouble(WideToUTF8(l10n_util::GetString(col_resource_id)), &chars);
int width = font.GetExpectedTextWidth(static_cast<int>(chars));
- DCHECK(width > 0);
+ DCHECK_GT(width, 0);
return width;
}
@@ -24,7 +26,7 @@ int GetLocalizedContentsHeightForFont(int row_resource_id,
double lines = 0;
StringToDouble(WideToUTF8(l10n_util::GetString(row_resource_id)), &lines);
int height = static_cast<int>(font.height() * lines);
- DCHECK(height > 0);
+ DCHECK_GT(height, 0);
return height;
}
@@ -36,4 +38,3 @@ gfx::Size GetLocalizedContentsSizeForFont(int col_resource_id,
}
} // namespace gfx
-
diff --git a/app/gfx/text_elider.cc b/app/gfx/text_elider.cc
index a925664a..c96c731 100644
--- a/app/gfx/text_elider.cc
+++ b/app/gfx/text_elider.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <vector>
+
#include "app/gfx/font.h"
#include "app/gfx/text_elider.h"
#include "app/l10n_util.h"
#include "base/file_path.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
+#include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "net/base/escape.h"
#include "net/base/net_util.h"
@@ -70,7 +73,7 @@ std::wstring ElideUrl(const GURL& url,
url_domain = url_host;
// Add port if required.
- if (!url.port().empty()){
+ if (!url.port().empty()) {
url_host += L":" + UTF8ToWide(url.port());
url_domain += L":" + UTF8ToWide(url.port());
}
@@ -92,7 +95,7 @@ std::wstring ElideUrl(const GURL& url,
// Split the path string using ":"
std::vector<std::wstring> file_path_split;
SplitString(url_path, L':', &file_path_split);
- if (file_path_split.size() > 1) { // File is of type "file:///C:/.."
+ if (file_path_split.size() > 1) { // File is of type "file:///C:/.."
url_host.clear();
url_domain.clear();
url_subdomain.clear();
@@ -246,7 +249,7 @@ std::wstring ElideUrl(const GURL& url,
std::wstring final_elided_url_string(url_elided_domain);
if ((available_pixel_width - font.GetStringWidth(url_elided_domain)) >
pixel_width_dot_dot_slash + pixel_width_dots_trailer +
- font.GetStringWidth(L"UV")) // A hack to prevent trailing "../...".
+ font.GetStringWidth(L"UV")) // A hack to prevent trailing "../...".
final_elided_url_string += elided_path;
else
final_elided_url_string += url_path;
@@ -296,7 +299,7 @@ std::wstring ElideFilename(const FilePath& filename,
// does not fit the given pixel width.
std::wstring ElideText(const std::wstring& text,
const gfx::Font& font,
- int available_pixel_width){
+ int available_pixel_width) {
if (text.empty())
return text;
@@ -416,4 +419,4 @@ string16 SortedDisplayURL::AfterHost() const {
return display_url_.substr(slash_index + sort_host_.length());
}
-} // namespace gfx.
+} // namespace gfx.
diff --git a/app/l10n_util_collator.h b/app/l10n_util_collator.h
index c0abad1..8140cf0 100644
--- a/app/l10n_util_collator.h
+++ b/app/l10n_util_collator.h
@@ -5,6 +5,12 @@
#ifndef APP_L10N_UTIL_COLLATOR_H_
#define APP_L10N_UTIL_COLLATOR_H_
+#include <algorithm>
+#include <functional>
+#include <string>
+#include <vector>
+
+#include "base/utf_string_conversions.h"
#include "unicode/coll.h"
namespace l10n_util {