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

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improving comment and removing the NOTREACHED. 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/devtools/devtools_ui_bindings.cc
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index e083cfbf8aa6f592c6766830864c135922a40f1e..2ad277b1bba56668abe85e7d22f5767ef4667a3c 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -44,7 +44,6 @@
#include "components/zoom/page_zoom.h"
#include "content/public/browser/devtools_external_agent_proxy.h"
#include "content/public/browser/devtools_external_agent_proxy_delegate.h"
-#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_source.h"
@@ -536,9 +535,8 @@ void DevToolsUIBindings::InspectedURLChanged(const std::string& url) {
content::NavigationController& controller = web_contents()->GetController();
content::NavigationEntry* entry = controller.GetActiveEntry();
// DevTools UI is not localized.
- entry->SetTitle(
- base::UTF8ToUTF16(base::StringPrintf(kTitleFormat, url.c_str())));
- web_contents()->NotifyNavigationStateChanged(content::INVALIDATE_TYPE_TITLE);
+ web_contents()->UpdateTitleForEntry(
+ entry, base::UTF8ToUTF16(base::StringPrintf(kTitleFormat, url.c_str())));
}
void DevToolsUIBindings::LoadNetworkResource(const DispatchCallback& callback,

Powered by Google App Engine
This is Rietveld 408576698