OLD | NEW |
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 "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_store.h" | 5 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event
_store.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
11 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
14 #include "base/time/time.h" | 16 #include "base/time/time.h" |
15 #include "base/values.h" | 17 #include "base/values.h" |
16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
igurator.h" | 18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
igurator.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 sanitized_event->SetString("url", "www.foo.com"); | 291 sanitized_event->SetString("url", "www.foo.com"); |
290 | 292 |
291 bypass_event->Set("params", bypass_params.Pass()); | 293 bypass_event->Set("params", bypass_params.Pass()); |
292 std::string sanitized_output; | 294 std::string sanitized_output; |
293 base::JSONWriter::Write(*sanitized_event.get(), &sanitized_output); | 295 base::JSONWriter::Write(*sanitized_event.get(), &sanitized_output); |
294 event_store()->AddAndSetLastBypassEvent(bypass_event.Pass(), 0); | 296 event_store()->AddAndSetLastBypassEvent(bypass_event.Pass(), 0); |
295 EXPECT_EQ(sanitized_output, event_store()->SanitizedLastBypassEvent()); | 297 EXPECT_EQ(sanitized_output, event_store()->SanitizedLastBypassEvent()); |
296 } | 298 } |
297 | 299 |
298 } // namespace data_reduction_proxy | 300 } // namespace data_reduction_proxy |
OLD | NEW |