summaryrefslogtreecommitdiffstats
path: root/chrome/browser/icon_manager_linux.cc
blob: 930320e93f73c2ee44ae5cf323b9cfdf82a6152b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2011 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/icon_manager.h"

#include "base/mime_util.h"
#include "base/threading/thread_restrictions.h"

IconGroupID IconManager::GetGroupIDFromFilepath(const FilePath& filepath) {
#if defined(USE_AURA)
  // TODO(davemoore) Implement this for aura.
  return std::string();
#else
  // It turns out the call to mime_util::GetFileMimeType below does IO, but
  // callers of GetGroupIDFromFilepath assume it does not do IO (the Windows
  // and Mac implementations do not). We should fix this by either not doing IO
  // in this method, or reworking callers to avoid calling it on the UI thread.
  // See crbug.com/72740.
  base::ThreadRestrictions::ScopedAllowIO allow_io;

  return mime_util::GetFileMimeType(filepath);
#endif
}