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

Unified Diff: chrome/browser/extensions/api/tabs/windows_event_router.cc

Issue 2030013003: Remove ListValue::Append(new {Fundamental,String}Value(...)) pattern in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/tabs/windows_event_router.cc
diff --git a/chrome/browser/extensions/api/tabs/windows_event_router.cc b/chrome/browser/extensions/api/tabs/windows_event_router.cc
index 6c0251f4da0ef443a5d02b0f0c8013749810f654..e07fad88d840e8761a12065f14bfa7ce0c53ca18 100644
--- a/chrome/browser/extensions/api/tabs/windows_event_router.cc
+++ b/chrome/browser/extensions/api/tabs/windows_event_router.cc
@@ -117,11 +117,10 @@ bool WillDispatchWindowFocusedEvent(
if (cant_cross_incognito || !visible_to_listener) {
event->event_args->Clear();
- event->event_args->Append(
- new base::FundamentalValue(extension_misc::kUnknownWindowId));
+ event->event_args->AppendInteger(extension_misc::kUnknownWindowId);
} else {
event->event_args->Clear();
- event->event_args->Append(new base::FundamentalValue(window_id));
+ event->event_args->AppendInteger(window_id);
}
return true;
}
@@ -210,7 +209,7 @@ void WindowsEventRouter::OnWindowControllerRemoved(
int window_id = window_controller->GetWindowId();
std::unique_ptr<base::ListValue> args(new base::ListValue());
- args->Append(new base::FundamentalValue(window_id));
+ args->AppendInteger(window_id);
DispatchEvent(events::WINDOWS_ON_REMOVED, windows::OnRemoved::kEventName,
window_controller, std::move(args));
}

Powered by Google App Engine
This is Rietveld 408576698