summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 20:41:21 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 20:41:21 +0000
commite5285892d1f34618bf65f207c73eaed2e61357f3 (patch)
tree3029892991a00a440f3bfba91ef6c8edfb7ef292 /base
parent7e98f94bf8b44c8b16b81a4b12700ed425343f91 (diff)
downloadchromium_src-e5285892d1f34618bf65f207c73eaed2e61357f3.zip
chromium_src-e5285892d1f34618bf65f207c73eaed2e61357f3.tar.gz
chromium_src-e5285892d1f34618bf65f207c73eaed2e61357f3.tar.bz2
Linux: Move base/mime_util* to base/nix. It's not used on any other platform.
BUG=none TEST=none Review URL: http://codereview.chromium.org/8538008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/base.gypi4
-rw-r--r--base/nix/mime_util_xdg.cc (renamed from base/mime_util_xdg.cc)14
-rw-r--r--base/nix/mime_util_xdg.h (renamed from base/mime_util.h)12
3 files changed, 17 insertions, 13 deletions
diff --git a/base/base.gypi b/base/base.gypi
index f81be8a..8cfd5fd 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -195,8 +195,6 @@
'metrics/stats_counters.h',
'metrics/stats_table.cc',
'metrics/stats_table.h',
- 'mime_util.h',
- 'mime_util_xdg.cc',
'native_library.h',
'native_library_linux.cc',
'native_library_mac.mm',
@@ -360,6 +358,8 @@
'version.h',
'vlog.cc',
'vlog.h',
+ 'nix/mime_util_xdg.cc',
+ 'nix/mime_util_xdg.h',
'nix/xdg_util.cc',
'nix/xdg_util.h',
'win/event_trace_consumer.h',
diff --git a/base/mime_util_xdg.cc b/base/nix/mime_util_xdg.cc
index 3232da0..77e9ae3 100644
--- a/base/mime_util_xdg.cc
+++ b/base/nix/mime_util_xdg.cc
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/mime_util.h"
-
+#include "base/nix/mime_util_xdg.h"
#include <cstdlib>
#include <list>
@@ -16,7 +15,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
-#include "base/message_loop.h"
#include "base/nix/xdg_util.h"
#include "base/string_split.h"
#include "base/string_util.h"
@@ -26,7 +24,9 @@
#include "base/time.h"
#if defined(TOOLKIT_USES_GTK)
-#include <gtk/gtk.h>
+#include <gtk/gtk.h> // NOLINT
+
+#include "base/message_loop.h"
#endif
namespace {
@@ -585,7 +585,8 @@ MimeUtilConstants::~MimeUtilConstants() {
} // namespace
-namespace mime_util {
+namespace base {
+namespace nix {
std::string GetFileMimeType(const FilePath& filepath) {
base::ThreadRestrictions::AssertIOAllowed();
@@ -672,4 +673,5 @@ FilePath GetMimeIcon(const std::string& mime_type, size_t size) {
return FilePath();
}
-} // namespace mime_util
+} // namespace nix
+} // namespace base
diff --git a/base/mime_util.h b/base/nix/mime_util_xdg.h
index 7af0472..94a6c06 100644
--- a/base/mime_util.h
+++ b/base/nix/mime_util_xdg.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_MIME_UTIL_H_
-#define BASE_MIME_UTIL_H_
+#ifndef BASE_NIX_MIME_UTIL_XDG_H_
+#define BASE_NIX_MIME_UTIL_XDG_H_
#pragma once
#include <string>
@@ -13,7 +13,8 @@
class FilePath;
-namespace mime_util {
+namespace base {
+namespace nix {
// Gets the mime type for a file based on its filename. The file path does not
// have to exist. Please note because it doesn't touch the disk, this does not
@@ -37,6 +38,7 @@ BASE_EXPORT void DetectGtkTheme();
// then a generic icon, and finally an empty FilePath if all else fails.
BASE_EXPORT FilePath GetMimeIcon(const std::string& mime_type, size_t size);
-} // namespace mime_util
+} // namespace nix
+} // namespace base
-#endif // BASE_MIME_UTIL_H_
+#endif // BASE_NIX_MIME_UTIL_XDG_H_