Commit e45e6745 authored by brettw@chromium.org's avatar brettw@chromium.org

Make base compile with no "using base::FilePath".

For base .cc files not using the base namespace, I added a using since theses
files should be moved to the base namespace, and then explicit qualification
will no longer be necessary.

Review URL: https://codereview.chromium.org/12226121

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182032 0039d316-1c4b-4281-b951-d872f2087c98
parent 3b01e878
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <shellapi.h> #include <shellapi.h>
#endif #endif
using base::FilePath;
CommandLine* CommandLine::current_process_commandline_ = NULL; CommandLine* CommandLine::current_process_commandline_ = NULL;
namespace { namespace {
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#endif #endif
namespace base {
#if defined(FILE_PATH_USES_WIN_SEPARATORS) #if defined(FILE_PATH_USES_WIN_SEPARATORS)
const FilePath::CharType FilePath::kSeparators[] = FILE_PATH_LITERAL("\\/"); const FilePath::CharType FilePath::kSeparators[] = FILE_PATH_LITERAL("\\/");
#else // FILE_PATH_USES_WIN_SEPARATORS #else // FILE_PATH_USES_WIN_SEPARATORS
...@@ -1254,3 +1256,5 @@ FilePath FilePath::NormalizePathSeparators() const { ...@@ -1254,3 +1256,5 @@ FilePath FilePath::NormalizePathSeparators() const {
void PrintTo(const FilePath& path, std::ostream* out) { void PrintTo(const FilePath& path, std::ostream* out) {
*out << path.value(); *out << path.value();
} }
} // namespace base
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include "base/string_util.h" #include "base/string_util.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
using base::FilePath;
namespace { namespace {
const FilePath::CharType kExtensionSeparator = FILE_PATH_LITERAL('.'); const FilePath::CharType kExtensionSeparator = FILE_PATH_LITERAL('.');
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
namespace file_util { namespace file_util {
bool GetFileSystemType(const FilePath& path, FileSystemType* type) { bool GetFileSystemType(const base::FilePath& path, FileSystemType* type) {
struct statfs statfs_buf; struct statfs statfs_buf;
if (statfs(path.value().c_str(), &statfs_buf) < 0) { if (statfs(path.value().c_str(), &statfs_buf) < 0) {
if (errno == ENOENT) if (errno == ENOENT)
......
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
#include "base/chromeos/chromeos_version.h" #include "base/chromeos/chromeos_version.h"
#endif #endif
using base::FilePath;
namespace file_util { namespace file_util {
namespace { namespace {
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include "base/json/json_string_value_serializer.h" #include "base/json/json_string_value_serializer.h"
#include "base/logging.h" #include "base/logging.h"
using base::FilePath;
const char* JSONFileValueSerializer::kAccessDenied = "Access denied."; const char* JSONFileValueSerializer::kAccessDenied = "Access denied.";
const char* JSONFileValueSerializer::kCannotReadFile = "Can't read file."; const char* JSONFileValueSerializer::kCannotReadFile = "Can't read file.";
const char* JSONFileValueSerializer::kFileLocked = "File locked."; const char* JSONFileValueSerializer::kFileLocked = "File locked.";
......
...@@ -18,7 +18,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { ...@@ -18,7 +18,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
// deserialization or the destination of the serialization. // deserialization or the destination of the serialization.
// When deserializing, the file should exist, but when serializing, the // When deserializing, the file should exist, but when serializing, the
// serializer will attempt to create the file at the specified location. // serializer will attempt to create the file at the specified location.
explicit JSONFileValueSerializer(const FilePath& json_file_path) explicit JSONFileValueSerializer(const base::FilePath& json_file_path)
: json_file_path_(json_file_path), : json_file_path_(json_file_path),
allow_trailing_comma_(false) {} allow_trailing_comma_(false) {}
...@@ -74,7 +74,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer { ...@@ -74,7 +74,7 @@ class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
private: private:
bool SerializeInternal(const Value& root, bool omit_binary_values); bool SerializeInternal(const Value& root, bool omit_binary_values);
FilePath json_file_path_; base::FilePath json_file_path_;
bool allow_trailing_comma_; bool allow_trailing_comma_;
// A wrapper for file_util::ReadFileToString which returns a non-zero // A wrapper for file_util::ReadFileToString which returns a non-zero
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#include "base/message_loop.h" #include "base/message_loop.h"
#endif #endif
namespace base {
namespace nix {
namespace { namespace {
class IconTheme; class IconTheme;
...@@ -583,9 +586,6 @@ MimeUtilConstants::~MimeUtilConstants() { ...@@ -583,9 +586,6 @@ MimeUtilConstants::~MimeUtilConstants() {
} // namespace } // namespace
namespace base {
namespace nix {
std::string GetFileMimeType(const FilePath& filepath) { std::string GetFileMimeType(const FilePath& filepath) {
if (filepath.empty()) if (filepath.empty())
return std::string(); return std::string();
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "base/logging.h" #include "base/logging.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
using base::FilePath;
namespace base { namespace base {
bool PathProvider(int key, FilePath* result); bool PathProvider(int key, FilePath* result);
#if defined(OS_WIN) #if defined(OS_WIN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment