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

Side by Side Diff: extensions/browser/event_router.cc

Issue 2323993004: Remove use of deprecated base::ListValue::Append(Value*) overload in extensions. (Closed)
Patch Set: ... I hate C++ Created 4 years, 3 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
« no previous file with comments | « extensions/browser/computed_hashes.cc ('k') | extensions/browser/script_executor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "extensions/browser/event_router.h" 5 #include "extensions/browser/event_router.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <tuple> 9 #include <tuple>
10 #include <utility> 10 #include <utility>
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 DictionaryValue* filtered_events = update.Get(); 407 DictionaryValue* filtered_events = update.Get();
408 if (!filtered_events) 408 if (!filtered_events)
409 filtered_events = update.Create(); 409 filtered_events = update.Create();
410 410
411 ListValue* filter_list = NULL; 411 ListValue* filter_list = NULL;
412 if (!filtered_events->GetList(event_name, &filter_list)) { 412 if (!filtered_events->GetList(event_name, &filter_list)) {
413 filter_list = new ListValue; 413 filter_list = new ListValue;
414 filtered_events->SetWithoutPathExpansion(event_name, filter_list); 414 filtered_events->SetWithoutPathExpansion(event_name, filter_list);
415 } 415 }
416 416
417 filter_list->Append(filter->DeepCopy()); 417 filter_list->Append(filter->CreateDeepCopy());
418 } 418 }
419 419
420 void EventRouter::RemoveFilterFromEvent(const std::string& event_name, 420 void EventRouter::RemoveFilterFromEvent(const std::string& event_name,
421 const std::string& extension_id, 421 const std::string& extension_id,
422 const DictionaryValue* filter) { 422 const DictionaryValue* filter) {
423 ExtensionPrefs::ScopedDictionaryUpdate update( 423 ExtensionPrefs::ScopedDictionaryUpdate update(
424 extension_prefs_, extension_id, kFilteredEvents); 424 extension_prefs_, extension_id, kFilteredEvents);
425 DictionaryValue* filtered_events = update.Get(); 425 DictionaryValue* filtered_events = update.Get();
426 ListValue* filter_list = NULL; 426 ListValue* filter_list = NULL;
427 if (!filtered_events || 427 if (!filtered_events ||
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 const std::string& extension_id, 893 const std::string& extension_id,
894 const GURL& listener_url, 894 const GURL& listener_url,
895 content::BrowserContext* browser_context) 895 content::BrowserContext* browser_context)
896 : event_name(event_name), 896 : event_name(event_name),
897 extension_id(extension_id), 897 extension_id(extension_id),
898 listener_url(listener_url), 898 listener_url(listener_url),
899 browser_context(browser_context) { 899 browser_context(browser_context) {
900 } 900 }
901 901
902 } // namespace extensions 902 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/computed_hashes.cc ('k') | extensions/browser/script_executor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698