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

Unified Diff: extensions/browser/api/mime_handler_private/mime_handler_private.cc

Issue 2494873002: Mojo C++ bindings: switch mime_handler mojom target to use STL types. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | extensions/common/api/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/mime_handler_private/mime_handler_private.cc
diff --git a/extensions/browser/api/mime_handler_private/mime_handler_private.cc b/extensions/browser/api/mime_handler_private/mime_handler_private.cc
index b24bf8d257643166084c0888ed01627fb81c9525..512366aea2836baa37ec9c941a4681b53542d491 100644
--- a/extensions/browser/api/mime_handler_private/mime_handler_private.cc
+++ b/extensions/browser/api/mime_handler_private/mime_handler_private.cc
@@ -4,6 +4,7 @@
#include "extensions/browser/api/mime_handler_private/mime_handler_private.h"
+#include <unordered_map>
#include <utility>
#include "base/strings/string_util.h"
@@ -12,18 +13,17 @@
#include "content/public/common/content_constants.h"
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
#include "extensions/common/constants.h"
-#include "mojo/public/cpp/bindings/map.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/http/http_response_headers.h"
namespace extensions {
namespace {
-mojo::Map<mojo::String, mojo::String> CreateResponseHeadersMap(
+std::unordered_map<std::string, std::string> CreateResponseHeadersMap(
const net::HttpResponseHeaders* headers) {
- std::map<std::string, std::string> result;
+ std::unordered_map<std::string, std::string> result;
if (!headers)
- return mojo::Map<mojo::String, mojo::String>::From(result);
+ return result;
size_t iter = 0;
std::string header_name;
@@ -43,7 +43,7 @@ mojo::Map<mojo::String, mojo::String> CreateResponseHeadersMap(
current_value += ", ";
current_value += header_value;
}
- return mojo::Map<mojo::String, mojo::String>::From(result);
+ return result;
}
} // namespace
« no previous file with comments | « no previous file | extensions/common/api/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698