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

Side by Side Diff: chrome/browser/extensions/activity_log/stream_noargs_ui_policy.cc

Issue 18878009: Add functions to clean URLs from the activity log (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some comments Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698