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

Side by Side Diff: chrome/browser/history/history_extension_api.cc

Issue 10514013: Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix cross_incognito_args bug Created 8 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/history/history_extension_api.h" 5 #include "chrome/browser/history/history_extension_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 std::string json_args; 155 std::string json_args;
156 base::JSONWriter::Write(&args, &json_args); 156 base::JSONWriter::Write(&args, &json_args);
157 DispatchEvent(profile, kOnVisitRemoved, json_args); 157 DispatchEvent(profile, kOnVisitRemoved, json_args);
158 } 158 }
159 159
160 void HistoryExtensionEventRouter::DispatchEvent(Profile* profile, 160 void HistoryExtensionEventRouter::DispatchEvent(Profile* profile,
161 const char* event_name, 161 const char* event_name,
162 const std::string& json_args) { 162 const std::string& json_args) {
163 if (profile && profile->GetExtensionEventRouter()) { 163 if (profile && profile->GetExtensionEventRouter()) {
164 profile->GetExtensionEventRouter()->DispatchEventToRenderers( 164 profile->GetExtensionEventRouter()->DispatchEventToRenderers(
165 event_name, json_args, profile, GURL()); 165 event_name, json_args, profile, GURL(),
166 extensions::EventFilteringInfo());
166 } 167 }
167 } 168 }
168 169
169 void HistoryFunction::Run() { 170 void HistoryFunction::Run() {
170 if (!RunImpl()) { 171 if (!RunImpl()) {
171 SendResponse(false); 172 SendResponse(false);
172 } 173 }
173 } 174 }
174 175
175 bool HistoryFunction::GetUrlFromValue(Value* value, GURL* url) { 176 bool HistoryFunction::GetUrlFromValue(Value* value, GURL* url) {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 &cancelable_consumer_, 393 &cancelable_consumer_,
393 base::Bind(&DeleteAllHistoryFunction::DeleteComplete, 394 base::Bind(&DeleteAllHistoryFunction::DeleteComplete,
394 base::Unretained(this))); 395 base::Unretained(this)));
395 396
396 return true; 397 return true;
397 } 398 }
398 399
399 void DeleteAllHistoryFunction::DeleteComplete() { 400 void DeleteAllHistoryFunction::DeleteComplete() {
400 SendAsyncResponse(); 401 SendAsyncResponse();
401 } 402 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698