summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-22 15:23:34 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-22 15:23:34 +0000
commit0e29223dd481cd628cfc1d07ee6a555c865432a4 (patch)
tree0c03427e5b23d03182d1e6e2f738e713d51ca553 /chrome/browser
parentaa268f5824938088f59c76b41978180b3e340caf (diff)
downloadchromium_src-0e29223dd481cd628cfc1d07ee6a555c865432a4.zip
chromium_src-0e29223dd481cd628cfc1d07ee6a555c865432a4.tar.gz
chromium_src-0e29223dd481cd628cfc1d07ee6a555c865432a4.tar.bz2
Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII("").
Review URL: http://codereview.chromium.org/18499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/extensions/extension.cc3
-rw-r--r--chrome/browser/extensions/extension.h2
-rw-r--r--chrome/browser/extensions/extensions_service.cc3
-rw-r--r--chrome/browser/extensions/user_script_master_unittest.cc6
-rw-r--r--chrome/browser/history/starred_url_database_unittest.cc4
-rw-r--r--chrome/browser/importer/firefox2_importer.cc6
-rw-r--r--chrome/browser/net/url_fetcher_unittest.cc12
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc4
-rw-r--r--chrome/browser/session_history_uitest.cc2
-rw-r--r--chrome/browser/sessions/session_restore_uitest.cc8
-rw-r--r--chrome/browser/visitedlink_perftest.cc2
11 files changed, 26 insertions, 26 deletions
diff --git a/chrome/browser/extensions/extension.cc b/chrome/browser/extensions/extension.cc
index d93cacd..e8d6513 100644
--- a/chrome/browser/extensions/extension.cc
+++ b/chrome/browser/extensions/extension.cc
@@ -7,8 +7,7 @@
#include "base/logging.h"
#include "base/string_util.h"
-const FilePath::CharType* Extension::kManifestFilename =
- FILE_PATH_LITERAL("manifest");
+const char Extension::kManifestFilename[] = "manifest";
const wchar_t* Extension::kFormatVersionKey = L"format_version";
const wchar_t* Extension::kIdKey = L"id";
diff --git a/chrome/browser/extensions/extension.h b/chrome/browser/extensions/extension.h
index 2b2f775..8a82547 100644
--- a/chrome/browser/extensions/extension.h
+++ b/chrome/browser/extensions/extension.h
@@ -22,7 +22,7 @@ class Extension {
static const int kExpectedFormatVersion = 1;
// The name of the manifest inside an extension.
- static const FilePath::CharType* kManifestFilename;
+ static const char kManifestFilename[];
// Keys used in JSON representation of extensions.
static const wchar_t* kFormatVersionKey;
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index f38ff04..cbefb3f 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -80,7 +80,8 @@ bool ExtensionsServiceBackend::LoadExtensionsFromDirectory(
file_util::FileEnumerator::DIRECTORIES);
for (FilePath child_path = enumerator.Next(); !child_path.value().empty();
child_path = enumerator.Next()) {
- FilePath manifest_path = child_path.Append(Extension::kManifestFilename);
+ FilePath manifest_path =
+ child_path.AppendASCII(Extension::kManifestFilename);
if (!file_util::PathExists(manifest_path)) {
ReportExtensionLoadError(frontend.get(), child_path.ToWStringHack(),
Extension::kInvalidManifestError);
diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc
index 4c11661..0fa1932 100644
--- a/chrome/browser/extensions/user_script_master_unittest.cc
+++ b/chrome/browser/extensions/user_script_master_unittest.cc
@@ -25,7 +25,7 @@ class UserScriptMasterTest : public testing::Test,
// Name a subdirectory of the temp directory.
FilePath tmp_dir;
ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &tmp_dir));
- script_dir_ = tmp_dir.Append(FILE_PATH_LITERAL("UserScriptTest"));
+ script_dir_ = tmp_dir.AppendASCII("UserScriptTest");
// Create a fresh, empty copy of this directory.
file_util::Delete(script_dir_, true);
@@ -87,7 +87,7 @@ TEST_F(UserScriptMasterTest, NewScripts) {
scoped_refptr<UserScriptMaster> master(
new UserScriptMaster(MessageLoop::current(), script_dir_));
- FilePath path = script_dir_.Append(FILE_PATH_LITERAL("script.user.js"));
+ FilePath path = script_dir_.AppendASCII("script.user.js");
FILE* file = file_util::OpenFile(path, "w");
const char content[] = "some content";
@@ -101,7 +101,7 @@ TEST_F(UserScriptMasterTest, NewScripts) {
// Test that we get notified about scripts if they're already in the test dir.
TEST_F(UserScriptMasterTest, ExistingScripts) {
- FilePath path = script_dir_.Append(FILE_PATH_LITERAL("script.user.js"));
+ FilePath path = script_dir_.AppendASCII("script.user.js");
FILE* file = file_util::OpenFile(path, "w");
const char content[] = "some content";
diff --git a/chrome/browser/history/starred_url_database_unittest.cc b/chrome/browser/history/starred_url_database_unittest.cc
index b570358..e1c8203 100644
--- a/chrome/browser/history/starred_url_database_unittest.cc
+++ b/chrome/browser/history/starred_url_database_unittest.cc
@@ -66,13 +66,13 @@ class StarredURLDatabaseTest : public testing::Test,
// Test setup.
void SetUp() {
PathService::Get(base::DIR_TEMP, &db_file_);
- db_file_ = db_file_.Append(FILE_PATH_LITERAL("VisitTest.db"));
+ db_file_ = db_file_.AppendASCII("VisitTest.db");
file_util::Delete(db_file_, false);
// Copy db file over that contains starred table.
FilePath old_history_path;
PathService::Get(chrome::DIR_TEST_DATA, &old_history_path);
- old_history_path = old_history_path.Append(FILE_PATH_LITERAL("bookmarks"));
+ old_history_path = old_history_path.AppendASCII("bookmarks");
old_history_path = old_history_path.Append(
FILE_PATH_LITERAL("History_with_empty_starred"));
file_util::CopyFile(old_history_path, db_file_);
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index b2f61c1..67f24b4 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -73,9 +73,9 @@ void Firefox2Importer::LoadDefaultBookmarks(const std::wstring& app_path,
// Firefox keeps its default bookmarks in a bookmarks.html file that
// lives at: <Firefox install dir>\defaults\profile\bookmarks.html
FilePath file = FilePath::FromWStringHack(app_path);
- file.Append(FILE_PATH_LITERAL("defaults"));
- file.Append(FILE_PATH_LITERAL("profile"));
- file.Append(FILE_PATH_LITERAL("bookmarks.html"));
+ file.AppendASCII("defaults");
+ file.AppendASCII("profile");
+ file.AppendASCII("bookmarks.html");
urls->clear();
diff --git a/chrome/browser/net/url_fetcher_unittest.cc b/chrome/browser/net/url_fetcher_unittest.cc
index 50e24fe..663fd7c 100644
--- a/chrome/browser/net/url_fetcher_unittest.cc
+++ b/chrome/browser/net/url_fetcher_unittest.cc
@@ -276,11 +276,11 @@ void URLFetcherProtectTest::OnURLFetchComplete(const URLFetcher* source,
URLFetcherBadHTTPSTest::URLFetcherBadHTTPSTest() {
PathService::Get(base::DIR_SOURCE_ROOT, &cert_dir_);
- cert_dir_ = cert_dir_.Append(FILE_PATH_LITERAL("chrome"));
- cert_dir_ = cert_dir_.Append(FILE_PATH_LITERAL("test"));
- cert_dir_ = cert_dir_.Append(FILE_PATH_LITERAL("data"));
- cert_dir_ = cert_dir_.Append(FILE_PATH_LITERAL("ssl"));
- cert_dir_ = cert_dir_.Append(FILE_PATH_LITERAL("certificates"));
+ cert_dir_ = cert_dir_.AppendASCII("chrome");
+ cert_dir_ = cert_dir_.AppendASCII("test");
+ cert_dir_ = cert_dir_.AppendASCII("data");
+ cert_dir_ = cert_dir_.AppendASCII("ssl");
+ cert_dir_ = cert_dir_.AppendASCII("certificates");
}
// The "server certificate expired" error should result in automatic
@@ -307,7 +307,7 @@ void URLFetcherBadHTTPSTest::OnURLFetchComplete(
}
FilePath URLFetcherBadHTTPSTest::GetExpiredCertPath() {
- return cert_dir_.Append(FILE_PATH_LITERAL("expired_cert.pem"));
+ return cert_dir_.AppendASCII("expired_cert.pem");
}
void URLFetcherCancelTest::CreateFetcher(const GURL& url) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 62910c5..0713e7d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -62,7 +62,7 @@ namespace {
std::wstring GetTestDatabaseName() {
FilePath filename;
PathService::Get(base::DIR_TEMP, &filename);
- filename = filename.Append(FILE_PATH_LITERAL("SafeBrowsingTestDatabase"));
+ filename = filename.AppendASCII("SafeBrowsingTestDatabase");
return filename.ToWStringHack();
}
@@ -1048,7 +1048,7 @@ void PeformUpdate(const std::wstring& initial_db,
FilePath path;
PathService::Get(base::DIR_TEMP, &path);
- path = path.Append(FILE_PATH_LITERAL("SafeBrowsingTestDatabase"));
+ path = path.AppendASCII("SafeBrowsingTestDatabase");
std::wstring filename = path.ToWStringHack();
// In case it existed from a previous run.
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc
index bc8fadc..d4a1e2a 100644
--- a/chrome/browser/session_history_uitest.cc
+++ b/chrome/browser/session_history_uitest.cc
@@ -23,7 +23,7 @@ class SessionHistoryTest : public UITest {
protected:
SessionHistoryTest() : UITest() {
FilePath path = FilePath::FromWStringHack(test_data_directory_);
- path = path.Append(FILE_PATH_LITERAL("session_history"))
+ path = path.AppendASCII("session_history")
.Append(FilePath::StringType(&FilePath::kSeparators[0], 1));
url_prefix_ = UTF8ToWide(net::FilePathToFileURL(path).spec());
diff --git a/chrome/browser/sessions/session_restore_uitest.cc b/chrome/browser/sessions/session_restore_uitest.cc
index ae8803e..80fd0baf 100644
--- a/chrome/browser/sessions/session_restore_uitest.cc
+++ b/chrome/browser/sessions/session_restore_uitest.cc
@@ -22,15 +22,15 @@ class SessionRestoreUITest : public UITest {
protected:
SessionRestoreUITest() : UITest() {
FilePath path_prefix = FilePath::FromWStringHack(test_data_directory_);
- path_prefix = path_prefix.Append(FILE_PATH_LITERAL("session_history"))
+ path_prefix = path_prefix.AppendASCII("session_history")
.Append(FilePath::StringType(&FilePath::kSeparators[0], 1));
url1 = net::FilePathToFileURL(
- path_prefix.Append(FILE_PATH_LITERAL("bot1.html")));
+ path_prefix.AppendASCII("bot1.html"));
url2 = net::FilePathToFileURL(
- path_prefix.Append(FILE_PATH_LITERAL("bot2.html")));
+ path_prefix.AppendASCII("bot2.html"));
url3 = net::FilePathToFileURL(
- path_prefix.Append(FILE_PATH_LITERAL("bot3.html")));
+ path_prefix.AppendASCII("bot3.html"));
}
virtual void QuitBrowserAndRestore() {
diff --git a/chrome/browser/visitedlink_perftest.cc b/chrome/browser/visitedlink_perftest.cc
index 3775fab..fc412d4 100644
--- a/chrome/browser/visitedlink_perftest.cc
+++ b/chrome/browser/visitedlink_perftest.cc
@@ -39,7 +39,7 @@ void DummyBroadcastNewTableEvent(base::SharedMemory *table) {
void InitDBName(std::wstring* db_name) {
FilePath db_path;
ASSERT_TRUE(file_util::GetCurrentDirectory(&db_path));
- db_path = db_path.Append(FILE_PATH_LITERAL("TempVisitedLinks"));
+ db_path = db_path.AppendASCII("TempVisitedLinks");
*db_name = db_path.ToWStringHack();
}