| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/json/json_string_value_serializer.h" | 5 #include "base/json/json_string_value_serializer.h" |
| 6 #include "chrome/browser/extensions/activity_log/stream_noargs_ui_policy.h" | 6 #include "chrome/browser/extensions/activity_log/stream_noargs_ui_policy.h" |
| 7 | 7 |
| 8 namespace extensions { | 8 namespace extensions { |
| 9 | 9 |
| 10 StreamWithoutArgsUIPolicy::StreamWithoutArgsUIPolicy(Profile* profile) | 10 StreamWithoutArgsUIPolicy::StreamWithoutArgsUIPolicy(Profile* profile) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Strip details of the web request modifications (for privacy reasons). | 34 // Strip details of the web request modifications (for privacy reasons). |
| 35 DictionaryValue::Iterator details_iterator(details); | 35 DictionaryValue::Iterator details_iterator(details); |
| 36 while (!details_iterator.IsAtEnd()) { | 36 while (!details_iterator.IsAtEnd()) { |
| 37 details.SetBoolean(details_iterator.key(), true); | 37 details.SetBoolean(details_iterator.key(), true); |
| 38 details_iterator.Advance(); | 38 details_iterator.Advance(); |
| 39 } | 39 } |
| 40 JSONStringValueSerializer serializer(&details_string); | 40 JSONStringValueSerializer serializer(&details_string); |
| 41 serializer.SerializeAndOmitBinaryValues(details); | 41 serializer.SerializeAndOmitBinaryValues(details); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void StreamWithoutArgsUIPolicy::RemoveURLs( |
| 45 const std::vector<GURL>& gurls) { |
| 46 ScheduleAndForget(db_, &ActivityDatabase::RemoveURLs, gurls); |
| 47 } |
| 48 |
| 49 void StreamWithoutArgsUIPolicy::RemoveURL(const GURL& gurl) { |
| 50 ScheduleAndForget(db_, &ActivityDatabase::RemoveURL, gurl); |
| 51 } |
| 52 |
| 44 } // namespace extensions | 53 } // namespace extensions |
| OLD | NEW |