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

Side by Side Diff: content/browser/mime_registry_impl.cc

Issue 2598963005: Include-what-you-use for WrapUnique/MakeUnique. (Closed)
Patch Set: restore order of includes in x11_topmost_window_finder_interactive_uitest.cc Created 3 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/mime_registry_impl.h" 5 #include "content/browser/mime_registry_impl.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/ptr_util.h"
8 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
9 #include "mojo/common/common_type_converters.h" 10 #include "mojo/common/common_type_converters.h"
10 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
11 #include "net/base/mime_util.h" 12 #include "net/base/mime_util.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 MimeRegistryImpl::MimeRegistryImpl() = default; 16 MimeRegistryImpl::MimeRegistryImpl() = default;
16 17
17 MimeRegistryImpl::~MimeRegistryImpl() = default; 18 MimeRegistryImpl::~MimeRegistryImpl() = default;
18 19
19 // static 20 // static
20 void MimeRegistryImpl::Create(blink::mojom::MimeRegistryRequest request) { 21 void MimeRegistryImpl::Create(blink::mojom::MimeRegistryRequest request) {
21 DCHECK_CURRENTLY_ON(BrowserThread::FILE); 22 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
22 mojo::MakeStrongBinding(base::MakeUnique<MimeRegistryImpl>(), 23 mojo::MakeStrongBinding(base::MakeUnique<MimeRegistryImpl>(),
23 std::move(request)); 24 std::move(request));
24 } 25 }
25 26
26 void MimeRegistryImpl::GetMimeTypeFromExtension( 27 void MimeRegistryImpl::GetMimeTypeFromExtension(
27 const std::string& extension, 28 const std::string& extension,
28 const GetMimeTypeFromExtensionCallback& callback) { 29 const GetMimeTypeFromExtensionCallback& callback) {
29 DCHECK_CURRENTLY_ON(BrowserThread::FILE); 30 DCHECK_CURRENTLY_ON(BrowserThread::FILE);
30 std::string mime_type; 31 std::string mime_type;
31 net::GetMimeTypeFromExtension( 32 net::GetMimeTypeFromExtension(
32 mojo::String(extension).To<base::FilePath::StringType>(), &mime_type); 33 mojo::String(extension).To<base::FilePath::StringType>(), &mime_type);
33 callback.Run(mime_type); 34 callback.Run(mime_type);
34 } 35 }
35 36
36 } // namespace content 37 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | content/browser/plugin_private_storage_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698