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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc

Issue 2112673002: Removing references to Off the Record from MediaRouter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More refactoring on rebased code Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
diff --git a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
index c75b3c73da27b2145ac17b1ce200eb6f5f04027d..437d1cb73697fa834be148a3126fd218951d8e64 100644
--- a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
@@ -142,7 +142,7 @@ std::unique_ptr<base::DictionaryValue> RouteToValue(
const MediaRoute& route,
bool can_join,
const std::string& extension_id,
- bool off_the_record,
+ bool incognito,
int current_cast_mode) {
std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue);
dictionary->SetString("id", route.media_route_id());
@@ -155,7 +155,7 @@ std::unique_ptr<base::DictionaryValue> RouteToValue(
}
const std::string& custom_path = route.custom_controller_path();
- if (!off_the_record && !custom_path.empty()) {
+ if (!incognito && !custom_path.empty()) {
std::string full_custom_controller_path = base::StringPrintf("%s://%s/%s",
extensions::kExtensionScheme, extension_id.c_str(),
custom_path.c_str());
@@ -233,7 +233,7 @@ std::string GetLearnMoreUrl(const base::DictionaryValue* args) {
MediaRouterWebUIMessageHandler::MediaRouterWebUIMessageHandler(
MediaRouterUI* media_router_ui)
- : off_the_record_(
+ : incognito_(
Profile::FromWebUI(media_router_ui->web_ui())->IsOffTheRecord()),
dialog_closing_(false),
media_router_ui_(media_router_ui) {}
@@ -278,7 +278,7 @@ void MediaRouterWebUIMessageHandler::OnCreateRouteResponseReceived(
route->media_route_id(), media_router_ui_->current_cast_modes());
std::unique_ptr<base::DictionaryValue> route_value(RouteToValue(
*route, false, media_router_ui_->GetRouteProviderExtensionId(),
- off_the_record_, current_cast_mode));
+ incognito_, current_cast_mode));
web_ui()->CallJavascriptFunctionUnsafe(
kOnCreateRouteResponseReceived, base::StringValue(sink_id),
*route_value, base::FundamentalValue(route->for_display()));
@@ -884,7 +884,7 @@ std::unique_ptr<base::ListValue> MediaRouterWebUIMessageHandler::RoutesToValue(
int current_cast_mode = CurrentCastModeForRouteId(route.media_route_id(),
current_cast_modes);
std::unique_ptr<base::DictionaryValue> route_val(RouteToValue(
- route, can_join, extension_id, off_the_record_, current_cast_mode));
+ route, can_join, extension_id, incognito_, current_cast_mode));
value->Append(std::move(route_val));
}

Powered by Google App Engine
This is Rietveld 408576698