Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1558)

Unified Diff: chrome/browser/chromeos/extensions/file_manager/mime_util.cc

Issue 23945002: file_manager: Move non-binding code to c/b/chromeos/file_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/file_manager/mime_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/mime_util.cc b/chrome/browser/chromeos/extensions/file_manager/mime_util.cc
deleted file mode 100644
index e048c07568ecec0103774738aee7d99a54da9130..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/extensions/file_manager/mime_util.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/extensions/file_manager/mime_util.h"
-
-#include <utility>
-#include "base/files/file_path.h"
-#include "base/strings/string_util.h"
-#include "net/base/mime_util.h"
-
-namespace file_manager {
-namespace util {
-
-std::string GetMimeTypeForPath(const base::FilePath& file_path) {
- const base::FilePath::StringType file_extension =
- StringToLowerASCII(file_path.Extension());
-
- // TODO(thorogood): Rearchitect this call so it can run on the File thread;
- // GetMimeTypeFromFile requires this on Linux. Right now, we use
- // Chrome-level knowledge only.
- std::string mime_type;
- if (file_extension.empty() ||
- !net::GetWellKnownMimeTypeFromExtension(file_extension.substr(1),
- &mime_type)) {
- // If the file doesn't have an extension or its mime-type cannot be
- // determined, then indicate that it has the empty mime-type. This will
- // only be matched if the Web Intents accepts "*" or "*/*".
- return "";
- } else {
- return mime_type;
- }
-}
-
-} // namespace util
-} // namespace file_manager

Powered by Google App Engine
This is Rietveld 408576698