OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/feedback/feedback_uploader_chrome.h" | 5 #include "components/feedback/feedback_uploader_chrome.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
| 9 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
10 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
11 #include "components/variations/variations_associated_data.h" | 12 #include "components/variations/variations_associated_data.h" |
12 #include "components/variations/variations_http_header_provider.h" | 13 #include "components/variations/variations_http_header_provider.h" |
13 #include "content/public/test/test_browser_context.h" | 14 #include "content/public/test/test_browser_context.h" |
14 #include "net/url_request/test_url_fetcher_factory.h" | 15 #include "net/url_request/test_url_fetcher_factory.h" |
15 #include "net/url_request/url_fetcher_delegate.h" | 16 #include "net/url_request/url_fetcher_delegate.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 namespace feedback { | 19 namespace feedback { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 std::string value; | 64 std::string value; |
64 EXPECT_TRUE(headers.GetHeader("X-Client-Data", &value)); | 65 EXPECT_TRUE(headers.GetHeader("X-Client-Data", &value)); |
65 EXPECT_FALSE(value.empty()); | 66 EXPECT_FALSE(value.empty()); |
66 // The fetcher's delegate is responsible for freeing the fetcher (and itself). | 67 // The fetcher's delegate is responsible for freeing the fetcher (and itself). |
67 fetcher->delegate()->OnURLFetchComplete(fetcher); | 68 fetcher->delegate()->OnURLFetchComplete(fetcher); |
68 | 69 |
69 variations::VariationsHttpHeaderProvider::GetInstance()->ResetForTesting(); | 70 variations::VariationsHttpHeaderProvider::GetInstance()->ResetForTesting(); |
70 } | 71 } |
71 | 72 |
72 } // namespace feedback | 73 } // namespace feedback |
OLD | NEW |