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

Side by Side Diff: net/http/http_transaction_test_util.cc

Issue 1869503003: Convert //net and //chromecast to std::unordered_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cast Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "net/http/http_transaction_test_util.h" 5 #include "net/http/http_transaction_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <unordered_map>
8 #include <utility> 9 #include <utility>
9 10
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/location.h" 12 #include "base/location.h"
12 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
13 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
14 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
15 #include "base/thread_task_runner_handle.h" 16 #include "base/thread_task_runner_handle.h"
16 #include "base/time/clock.h" 17 #include "base/time/clock.h"
17 #include "base/time/time.h" 18 #include "base/time/time.h"
18 #include "net/base/load_flags.h" 19 #include "net/base/load_flags.h"
19 #include "net/base/load_timing_info.h" 20 #include "net/base/load_timing_info.h"
20 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
21 #include "net/cert/x509_certificate.h" 22 #include "net/cert/x509_certificate.h"
22 #include "net/disk_cache/disk_cache.h" 23 #include "net/disk_cache/disk_cache.h"
23 #include "net/http/http_cache.h" 24 #include "net/http/http_cache.h"
24 #include "net/http/http_request_info.h" 25 #include "net/http/http_request_info.h"
25 #include "net/http/http_response_info.h" 26 #include "net/http/http_response_info.h"
26 #include "net/http/http_transaction.h" 27 #include "net/http/http_transaction.h"
27 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
28 29
29 namespace net { 30 namespace net {
30 31
31 namespace { 32 namespace {
32 typedef base::hash_map<std::string, const MockTransaction*> MockTransactionMap; 33 using MockTransactionMap =
34 std::unordered_map<std::string, const MockTransaction*>;
33 static MockTransactionMap mock_transactions; 35 static MockTransactionMap mock_transactions;
34 } // namespace 36 } // namespace
35 37
36 //----------------------------------------------------------------------------- 38 //-----------------------------------------------------------------------------
37 // mock transaction data 39 // mock transaction data
38 40
39 const MockTransaction kSimpleGET_Transaction = { 41 const MockTransaction kSimpleGET_Transaction = {
40 "http://www.google.com/", 42 "http://www.google.com/",
41 "GET", 43 "GET",
42 base::Time(), 44 base::Time(),
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 content.append(buf->data(), rv); 570 content.append(buf->data(), rv);
569 else if (rv < 0) 571 else if (rv < 0)
570 return rv; 572 return rv;
571 } while (rv > 0); 573 } while (rv > 0);
572 574
573 result->swap(content); 575 result->swap(content);
574 return OK; 576 return OK;
575 } 577 }
576 578
577 } // namespace net 579 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698