summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 20:34:39 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 20:34:39 +0000
commit91136d35aa4750c172c9cc709ae2e89d892923df (patch)
treeaeab29c8dade042475a353737ec60d21aed23a3f /chrome
parent6752e8bf9229eb6beafeedf03dccecc9cf7e9956 (diff)
downloadchromium_src-91136d35aa4750c172c9cc709ae2e89d892923df.zip
chromium_src-91136d35aa4750c172c9cc709ae2e89d892923df.tar.gz
chromium_src-91136d35aa4750c172c9cc709ae2e89d892923df.tar.bz2
Reverting 7083,7079.
I tested locally with gcc 4.3, but gcc 4.2 behaves differently and fails. Review URL: http://codereview.chromium.org/14165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/bookmarks/bookmark_html_writer_unittest.cc2
-rw-r--r--chrome/browser/browser.scons8
-rw-r--r--chrome/browser/cert_store.h2
-rw-r--r--chrome/browser/google_url_tracker_unittest.cc2
-rw-r--r--chrome/browser/history/history_backend_unittest.cc28
-rw-r--r--chrome/browser/metrics_log_unittest.cc2
-rw-r--r--chrome/browser/ssl_error_info.cc3
-rw-r--r--chrome/browser/url_fetcher.cc8
-rw-r--r--chrome/browser/url_fixer_upper.cc41
-rw-r--r--chrome/browser/url_fixer_upper_unittest.cc35
-rw-r--r--chrome/common/gfx/favicon_size.h8
11 files changed, 63 insertions, 76 deletions
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index 8f0ad23..403ad16 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -109,7 +109,7 @@ TEST_F(BookmarkHTMLWriterTest, Test) {
NULL);
// Verify we got back what we wrote.
- ASSERT_EQ(6U, parsed_bookmarks.size());
+ ASSERT_EQ(6, parsed_bookmarks.size());
AssertBookmarkEntryEquals(parsed_bookmarks[0], false, url1, url1_title, t1,
L"Bookmark Bar", f1_title, std::wstring());
AssertBookmarkEntryEquals(parsed_bookmarks[1], false, url2, url2_title, t2,
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 30e7a91..40599fb4 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -106,11 +106,7 @@ if env['PLATFORM'] in ('posix', 'win32'):
'safe_browsing/safe_browsing_service.cc',
'safe_browsing/safe_browsing_util.cc',
'session_startup_pref.cc',
- 'ssl_error_info.cc',
- 'template_url.cc',
- 'template_url_model.cc',
'template_url_parser.cc',
- 'url_fetcher.cc',
'url_fetcher_protect.cc',
'user_metrics.cc',
'webdata/web_database.cc',
@@ -264,6 +260,7 @@ if env['PLATFORM'] == 'win32':
'spellcheck_worditerator.cc',
'spellchecker.cc',
'ssl_blocking_page.cc',
+ 'ssl_error_info.cc',
'ssl_manager.cc',
'ssl_policy.cc',
'status_view.cc',
@@ -275,9 +272,12 @@ if env['PLATFORM'] == 'win32':
'tabs/tab_strip_model_order_controller.cc',
'task_manager.cc',
'task_manager_resource_providers.cc',
+ 'template_url.cc',
'template_url_fetcher.cc',
+ 'template_url_model.cc',
'template_url_prepopulate_data.cc',
'toolbar_model.cc',
+ 'url_fetcher.cc',
'url_fixer_upper.cc',
'user_data_manager.cc',
'view_source_contents.cc',
diff --git a/chrome/browser/cert_store.h b/chrome/browser/cert_store.h
index 48b53ef..742151a 100644
--- a/chrome/browser/cert_store.h
+++ b/chrome/browser/cert_store.h
@@ -61,7 +61,7 @@ class CertStore : public NotificationObserver {
static CertStore* instance_;
typedef std::multimap<int, int> IDMap;
- typedef std::map<int, scoped_refptr<net::X509Certificate> > CertMap;
+ typedef std::map<int, scoped_refptr<net::X509Certificate>> CertMap;
typedef std::map<net::X509Certificate*, int, net::X509Certificate::LessThan>
ReverseCertMap;
diff --git a/chrome/browser/google_url_tracker_unittest.cc b/chrome/browser/google_url_tracker_unittest.cc
index e4a9aac..80c4976 100644
--- a/chrome/browser/google_url_tracker_unittest.cc
+++ b/chrome/browser/google_url_tracker_unittest.cc
@@ -24,7 +24,7 @@ TEST(GoogleURLTrackerTest, CheckAndConvertURL) {
{ "http://google/", false, "", },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
+ for (size_t i = 0; i < arraysize(data); ++i) {
GURL base_url;
const bool can_convert = GoogleURLTracker::CheckAndConvertToGoogleBaseURL(
GURL(data[i].source_url), &base_url);
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index ea86d2e..2f9bcf4 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -57,7 +57,7 @@ class HistoryBackendTest : public testing::Test {
scoped_refptr<HistoryBackend> backend_; // Will be NULL on init failure.
scoped_ptr<InMemoryHistoryBackend> mem_backend_;
- void AddRedirectChain(const char* sequence[], int page_id) {
+ void AddRedirectChain(const wchar_t* sequence[], int page_id) {
HistoryService::RedirectList redirects;
for (int i = 0; sequence[i] != NULL; ++i)
redirects.push_back(GURL(sequence[i]));
@@ -78,7 +78,7 @@ class HistoryBackendTest : public testing::Test {
bool loaded_;
private:
- friend class HistoryBackendTestDelegate;
+ friend HistoryBackendTestDelegate;
// testing::Test
virtual void SetUp() {
@@ -104,7 +104,7 @@ class HistoryBackendTest : public testing::Test {
HistoryDetails* details) {
// Send the notifications directly to the in-memory database.
Details<HistoryDetails> det(details);
- mem_backend_->Observe(type, Source<HistoryBackendTest>(NULL), det);
+ mem_backend_->Observe(type, Source<HistoryTest>(NULL), det);
// The backend passes ownership of the details pointer to us.
delete details;
@@ -178,12 +178,12 @@ TEST_F(HistoryBackendTest, DeleteAll) {
// Get the two visits for the URLs we just added.
VisitVector visits;
backend_->db_->GetVisitsForURL(row1_id, &visits);
- ASSERT_EQ(1U, visits.size());
+ ASSERT_EQ(1, visits.size());
VisitID visit1_id = visits[0].visit_id;
visits.clear();
backend_->db_->GetVisitsForURL(row2_id, &visits);
- ASSERT_EQ(1U, visits.size());
+ ASSERT_EQ(1, visits.size());
VisitID visit2_id = visits[0].visit_id;
// The in-memory backend should have been set and it should have gotten the
@@ -234,7 +234,7 @@ TEST_F(HistoryBackendTest, DeleteAll) {
// All visits should be deleted for both URLs.
VisitVector all_visits;
backend_->db_->GetAllVisitsInRange(Time(), Time(), 0, &all_visits);
- ASSERT_EQ(0U, all_visits.size());
+ ASSERT_EQ(0, all_visits.size());
// All thumbnails should be deleted.
std::vector<unsigned char> out_data;
@@ -264,7 +264,7 @@ TEST_F(HistoryBackendTest, DeleteAll) {
backend_->text_database_->GetTextMatches(L"Body", QueryOptions(),
&text_matches,
&first_time_searched);
- EXPECT_EQ(0U, text_matches.size());
+ EXPECT_EQ(0, text_matches.size());
}
TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) {
@@ -315,7 +315,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) {
EXPECT_EQ(row2_id, backend_->db_->GetRowForURL(row2.url(), NULL));
VisitVector visits;
backend_->db_->GetVisitsForURL(row2_id, &visits);
- EXPECT_EQ(0U, visits.size());
+ EXPECT_EQ(0, visits.size());
// The favicon should still be valid.
EXPECT_EQ(favicon2,
backend_->thumbnail_db_->GetFavIconIDForFavIconURL(favicon_url2));
@@ -348,7 +348,7 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) {
// There should still be visits.
visits.clear();
backend_->db_->GetVisitsForURL(row1_id, &visits);
- EXPECT_EQ(1U, visits.size());
+ EXPECT_EQ(1, visits.size());
// The favicon should still be valid.
EXPECT_EQ(favicon1,
@@ -358,9 +358,9 @@ TEST_F(HistoryBackendTest, URLsNoLongerBookmarked) {
TEST_F(HistoryBackendTest, GetPageThumbnailAfterRedirects) {
ASSERT_TRUE(backend_.get());
- const char* base_url = "http://mail";
- const char* thumbnail_url = "http://mail.google.com";
- const char* first_chain[] = {
+ const wchar_t* base_url = L"http://mail";
+ const wchar_t* thumbnail_url = L"http://mail.google.com";
+ const wchar_t* first_chain[] = {
base_url,
thumbnail_url,
NULL
@@ -376,9 +376,9 @@ TEST_F(HistoryBackendTest, GetPageThumbnailAfterRedirects) {
// Write a second URL chain so that if you were to simply check what
// "http://mail" redirects to, you wouldn't see the URL that has
// contains the thumbnail.
- const char* second_chain[] = {
+ const wchar_t* second_chain[] = {
base_url,
- "http://mail.google.com/somewhere/else",
+ L"http://mail.google.com/somewhere/else",
NULL
};
AddRedirectChain(second_chain, 1);
diff --git a/chrome/browser/metrics_log_unittest.cc b/chrome/browser/metrics_log_unittest.cc
index a8fd6f8..65bcdab 100644
--- a/chrome/browser/metrics_log_unittest.cc
+++ b/chrome/browser/metrics_log_unittest.cc
@@ -113,7 +113,7 @@ TEST(MetricsLogTest, CreateHash) {
{"NewTab", "0x290eb683f96572f1"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
+ for (int i = 0; i < arraysize(cases); i++) {
std::string hash_string = MetricsLog::CreateHash(cases[i].input);
// Convert to hex string
diff --git a/chrome/browser/ssl_error_info.cc b/chrome/browser/ssl_error_info.cc
index 55fe353..8bae914 100644
--- a/chrome/browser/ssl_error_info.cc
+++ b/chrome/browser/ssl_error_info.cc
@@ -7,6 +7,7 @@
#include "base/string_util.h"
#include "chrome/browser/cert_store.h"
#include "chrome/common/l10n_util.h"
+#include "chrome/common/resource_bundle.h"
#include "chrome/common/time_format.h"
#include "net/base/cert_status_flags.h"
#include "net/base/net_errors.h"
@@ -234,7 +235,7 @@ int SSLErrorInfo::GetErrorsForCertStatus(int cert_id,
scoped_refptr<net::X509Certificate> cert = NULL;
int count = 0;
- for (size_t i = 0; i < arraysize(kErrorFlags); ++i) {
+ for (int i = 0; i < arraysize(kErrorFlags); ++i) {
if (cert_status & kErrorFlags[i]) {
count++;
if (!cert.get()) {
diff --git a/chrome/browser/url_fetcher.cc b/chrome/browser/url_fetcher.cc
index 313ae73..388a1f6 100644
--- a/chrome/browser/url_fetcher.cc
+++ b/chrome/browser/url_fetcher.cc
@@ -4,19 +4,19 @@
#include "chrome/browser/url_fetcher.h"
-#include "base/compiler_specific.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
+#include "chrome/browser/net/dns_master.h"
#include "googleurl/src/gurl.h"
#include "net/base/load_flags.h"
URLFetcher::URLFetcher(const GURL& url,
RequestType request_type,
Delegate* d)
- : ALLOW_THIS_IN_INITIALIZER_LIST(
- core_(new Core(this, url, request_type, d))) {
+#pragma warning(suppress: 4355) // Okay to pass "this" here.
+ : core_(new Core(this, url, request_type, d)) {
}
URLFetcher::~URLFetcher() {
@@ -34,8 +34,8 @@ URLFetcher::Core::Core(URLFetcher* fetcher,
delegate_loop_(MessageLoop::current()),
io_loop_(ChromeThread::GetMessageLoop(ChromeThread::IO)),
request_(NULL),
- load_flags_(net::LOAD_NORMAL),
response_code_(-1),
+ load_flags_(net::LOAD_NORMAL),
protect_entry_(URLFetcherProtectManager::GetInstance()->Register(
original_url_.host())),
num_retries_(0) {
diff --git a/chrome/browser/url_fixer_upper.cc b/chrome/browser/url_fixer_upper.cc
index 39fcafc..a62694d 100644
--- a/chrome/browser/url_fixer_upper.cc
+++ b/chrome/browser/url_fixer_upper.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <algorithm>
+#include <windows.h>
#include "chrome/browser/url_fixer_upper.h"
@@ -31,8 +32,8 @@ static void PrepareStringForFileOps(const wstring& text, wstring* output) {
// file exists, returns true and sets |full_path| to the result. Otherwise,
// returns false and leaves |full_path| unchanged.
static bool ValidPathForFile(const wstring& text, wstring* full_path) {
- wstring file_path(text);
- if (!file_util::AbsolutePath(&file_path))
+ wchar_t file_path[MAX_PATH];
+ if (!_wfullpath(file_path, text.c_str(), MAX_PATH))
return false;
if (!file_util::PathExists(file_path))
@@ -254,7 +255,6 @@ wstring URLFixerUpper::SegmentURL(const wstring& text,
// Initialize the result.
*parts = url_parse::Parsed();
-#if defined(OS_WIN)
wstring trimmed;
TrimWhitespace(text, TRIM_ALL, &trimmed);
if (trimmed.empty())
@@ -264,13 +264,11 @@ wstring URLFixerUpper::SegmentURL(const wstring& text,
if (url_parse::DoesBeginWindowsDriveSpec(trimmed.data(), 0, trimmed_length)
|| url_parse::DoesBeginUNCPath(trimmed.data(), 0, trimmed_length, false))
return L"file";
-#endif
// Otherwise, we need to look at things carefully.
wstring scheme;
- string text_utf8 = WideToUTF8(text);
- if (url_parse::ExtractScheme(text_utf8.c_str(),
- static_cast<int>(text_utf8.length()),
+ if (url_parse::ExtractScheme(text.data(),
+ static_cast<int>(text.length()),
&parts->scheme)) {
// We were able to extract a scheme. Remember what we have, but we may
// decide to change our minds later.
@@ -304,18 +302,14 @@ wstring URLFixerUpper::SegmentURL(const wstring& text,
StringToLowerASCII(&scheme);
// Not segmenting file schemes or nonstandard schemes.
- string scheme_utf8 = WideToUTF8(scheme);
if ((scheme == L"file") ||
- !url_util::IsStandard(scheme_utf8.c_str(),
- static_cast<int>(scheme_utf8.length()),
- url_parse::Component(0, static_cast<int>(scheme_utf8.length()))))
+ !url_util::IsStandard(scheme.c_str(), static_cast<int>(scheme.length()),
+ url_parse::Component(0, static_cast<int>(scheme.length()))))
return scheme;
if (parts->scheme.is_valid()) {
// Have the GURL parser do the heavy lifting for us.
- string text_utf8 = WideToUTF8(text);
- url_parse::ParseStandardURL(text_utf8.c_str(),
- static_cast<int>(text_utf8.length()),
+ url_parse::ParseStandardURL(text.data(), static_cast<int>(text.length()),
parts);
return scheme;
}
@@ -334,9 +328,8 @@ wstring URLFixerUpper::SegmentURL(const wstring& text,
text_to_parse.append(first_nonwhite, text.end());
// Have the GURL parser do the heavy lifting for us.
- string text_to_parse_utf8 = WideToUTF8(text_to_parse);
- url_parse::ParseStandardURL(text_to_parse_utf8.c_str(),
- static_cast<int>(text_to_parse_utf8.length()),
+ url_parse::ParseStandardURL(text_to_parse.data(),
+ static_cast<int>(text_to_parse.length()),
parts);
// Offset the results of the parse to match the original text.
@@ -369,9 +362,8 @@ std::wstring URLFixerUpper::FixupURL(const wstring& text,
return (parts.scheme.is_valid() ? text : FixupPath(text));
// For some schemes whose layouts we understand, we rebuild it.
- if (url_util::IsStandard(
- WideToUTF8(scheme).c_str(), static_cast<int>(scheme.length()),
- url_parse::Component(0, static_cast<int>(scheme.length())))) {
+ if (url_util::IsStandard(scheme.c_str(), static_cast<int>(scheme.length()),
+ url_parse::Component(0, static_cast<int>(scheme.length())))) {
wstring url(scheme);
url.append(L"://");
@@ -410,11 +402,12 @@ std::wstring URLFixerUpper::FixupURL(const wstring& text,
// regular fixup.
wstring URLFixerUpper::FixupRelativeFile(const wstring& base_dir,
const wstring& text) {
- wstring old_cur_directory;
+ wchar_t old_cur_directory[MAX_PATH];
if (!base_dir.empty()) {
// save the old current directory before we move to the new one
- file_util::GetCurrentDirectory(&old_cur_directory);
- file_util::SetCurrentDirectory(base_dir);
+ // TODO: in the future, we may want to handle paths longer than MAX_PATH
+ GetCurrentDirectory(MAX_PATH, old_cur_directory);
+ SetCurrentDirectory(base_dir.c_str());
}
// allow funny input with extra whitespace and the wrong kind of slashes
@@ -436,7 +429,7 @@ wstring URLFixerUpper::FixupRelativeFile(const wstring& base_dir,
// Put back the current directory if we saved it.
if (!base_dir.empty())
- file_util::SetCurrentDirectory(old_cur_directory);
+ SetCurrentDirectory(old_cur_directory);
if (is_file) {
GURL file_url = net::FilePathToFileURL(full_path);
diff --git a/chrome/browser/url_fixer_upper_unittest.cc b/chrome/browser/url_fixer_upper_unittest.cc
index 7bd1baa..e793505 100644
--- a/chrome/browser/url_fixer_upper_unittest.cc
+++ b/chrome/browser/url_fixer_upper_unittest.cc
@@ -3,10 +3,9 @@
// found in the LICENSE file.
#include <stdlib.h>
+#include <windows.h>
#include "base/basictypes.h"
-#include "base/file_path.h"
-#include "base/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/string_util.h"
@@ -96,7 +95,7 @@ TEST(URLFixerUpperTest, SegmentURL) {
std::wstring result;
url_parse::Parsed parts;
- for (size_t i = 0; i < arraysize(segment_cases); ++i) {
+ for (int i = 0; i < arraysize(segment_cases); ++i) {
segment_case value = segment_cases[i];
result = URLFixerUpper::SegmentURL(value.input, &parts);
EXPECT_EQ(value.result, result);
@@ -119,12 +118,13 @@ TEST(URLFixerUpperTest, SegmentURL) {
static bool MakeTempFile(const std::wstring& dir,
const std::wstring& file_name,
std::wstring* full_path) {
- FilePath dir_path = FilePath::FromWStringHack(dir);
- FilePath file_name_path = FilePath::FromWStringHack(file_name);
- FilePath path = dir_path.Append(file_name_path.value());
- if (!file_util::CreateTemporaryFileName(&path))
+ *full_path = dir + L"\\" + file_name;
+
+ HANDLE hfile = CreateFile(full_path->c_str(), GENERIC_READ | GENERIC_WRITE,
+ 0, NULL, CREATE_ALWAYS, 0, NULL);
+ if (hfile == NULL || hfile == INVALID_HANDLE_VALUE)
return false;
- *full_path = path.ToWStringHack();
+ CloseHandle(hfile);
return true;
}
@@ -139,7 +139,7 @@ static bool IsMatchingFileURL(const std::wstring& url,
return false; // contains backslashes
std::wstring derived_path;
- net::FileURLToFilePath(GURL(WideToUTF8(url)), &derived_path);
+ net::FileURLToFilePath(GURL(url), &derived_path);
return (derived_path.length() == full_file_path.length()) &&
std::equal(derived_path.begin(), derived_path.end(),
full_file_path.begin(), CaseInsensitiveCompare<wchar_t>());
@@ -178,7 +178,7 @@ struct fixup_case {
TEST(URLFixerUpperTest, FixupURL) {
std::wstring output;
- for (size_t i = 0; i < arraysize(fixup_cases); ++i) {
+ for (int i = 0; i < arraysize(fixup_cases); ++i) {
fixup_case value = fixup_cases[i];
output = URLFixerUpper::FixupURL(value.input, value.desired_tld);
EXPECT_EQ(value.output, output);
@@ -204,7 +204,7 @@ TEST(URLFixerUpperTest, FixupURL) {
{L"google:123", L"com", L"http://www.google.com:123/"},
{L"http://google:123", L"com", L"http://www.google.com:123/"},
};
- for (size_t i = 0; i < arraysize(tld_cases); ++i) {
+ for (int i = 0; i < arraysize(tld_cases); ++i) {
fixup_case value = tld_cases[i];
output = URLFixerUpper::FixupURL(value.input, value.desired_tld);
EXPECT_EQ(value.output, output);
@@ -260,13 +260,13 @@ TEST(URLFixerUpperTest, FixupFile) {
// {L"file://server/folder/file", L"", L"file://server/folder/file"},
// {L"file:/\\/server\\folder/file", L"", L"file://server/folder/file"},
};
- for (size_t i = 0; i < arraysize(file_cases); i++) {
+ for (int i = 0; i < arraysize(file_cases); i++) {
fixedup = URLFixerUpper::FixupURL(file_cases[i].input,
file_cases[i].desired_tld);
EXPECT_EQ(file_cases[i].output, fixedup);
}
- EXPECT_TRUE(file_util::Delete(original, false));
+ EXPECT_TRUE(DeleteFile(original.c_str()));
}
TEST(URLFixerUpperTest, FixupRelativeFile) {
@@ -277,7 +277,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
// make sure we pass through good URLs
std::wstring fixedup;
- for (size_t i = 0; i < arraysize(fixup_cases); ++i) {
+ for (int i = 0; i < arraysize(fixup_cases); ++i) {
fixup_case value = fixup_cases[i];
fixedup = URLFixerUpper::FixupRelativeFile(dir, value.input);
EXPECT_EQ(value.output, fixedup);
@@ -287,7 +287,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
// are no backslashes
fixedup = URLFixerUpper::FixupRelativeFile(dir, file_part);
EXPECT_PRED2(IsMatchingFileURL, fixedup, full_path);
- EXPECT_TRUE(file_util::Delete(full_path, false));
+ EXPECT_TRUE(DeleteFile(full_path.c_str()));
// create a filename we know doesn't exist and make sure it doesn't get
// fixed up to a file URL
@@ -301,7 +301,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
std::wstring sub_dir(L"url fixer-upper dir");
std::wstring sub_file(L"url fixer-upper existing file.txt");
std::wstring new_dir = dir + L"\\" + sub_dir;
- ASSERT_TRUE(file_util::CreateDirectory(new_dir));
+ CreateDirectory(new_dir.c_str(), NULL);
ASSERT_TRUE(MakeTempFile(new_dir, sub_file, &full_path));
// test file in the subdir
@@ -322,6 +322,7 @@ TEST(URLFixerUpperTest, FixupRelativeFile) {
EXPECT_PRED2(IsMatchingFileURL, fixedup, full_path);
// done with the subdir
- EXPECT_TRUE(file_util::Delete(new_dir, true));
+ EXPECT_TRUE(DeleteFile(full_path.c_str()));
+ EXPECT_TRUE(RemoveDirectory(new_dir.c_str()));
}
diff --git a/chrome/common/gfx/favicon_size.h b/chrome/common/gfx/favicon_size.h
index 0b3b264..bc5c12a 100644
--- a/chrome/common/gfx/favicon_size.h
+++ b/chrome/common/gfx/favicon_size.h
@@ -5,15 +5,9 @@
#ifndef CHROME_COMMON_GFX_FAVICON_SIZE_H__
#define CHROME_COMMON_GFX_FAVICON_SIZE_H__
-#include "build/build_config.h"
-
// Size (along each axis) of the favicon.
const int kFavIconSize = 16;
-#if !defined(OS_LINUX)
-// GCC 4.2 complains that this function is not used, and currently
-// it's not used by any file compiled on Linux. GCC 4.3 does not complain.
-
// If the width or height is bigger than the favicon size, a new width/height
// is calculated and returned in width/height that maintains the aspect
// ratio of the supplied values.
@@ -31,7 +25,5 @@ static void calc_favicon_target_size(int* width, int* height) {
}
}
-#endif // !defined(OS_LINUX)
-
#endif // CHROME_COMMON_GFX_FAVICON_SIZE_H__