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

Side by Side Diff: chrome/browser/extensions/extension_action_runner.cc

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_action_runner.h" 5 #include "chrome/browser/extensions/extension_action_runner.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 OnRequestScriptInjectionPermission) 396 OnRequestScriptInjectionPermission)
397 IPC_MESSAGE_UNHANDLED(handled = false) 397 IPC_MESSAGE_UNHANDLED(handled = false)
398 IPC_END_MESSAGE_MAP() 398 IPC_END_MESSAGE_MAP()
399 return handled; 399 return handled;
400 } 400 }
401 401
402 void ExtensionActionRunner::DidFinishNavigation( 402 void ExtensionActionRunner::DidFinishNavigation(
403 content::NavigationHandle* navigation_handle) { 403 content::NavigationHandle* navigation_handle) {
404 if (!navigation_handle->IsInMainFrame() || 404 if (!navigation_handle->IsInMainFrame() ||
405 !navigation_handle->HasCommitted() || 405 !navigation_handle->HasCommitted() ||
406 navigation_handle->IsSamePage()) { 406 navigation_handle->IsSameDocument()) {
407 return; 407 return;
408 } 408 }
409 409
410 LogUMA(); 410 LogUMA();
411 num_page_requests_ = 0; 411 num_page_requests_ = 0;
412 permitted_extensions_.clear(); 412 permitted_extensions_.clear();
413 pending_scripts_.clear(); 413 pending_scripts_.clear();
414 web_request_blocked_.clear(); 414 web_request_blocked_.clear();
415 was_used_on_page_ = false; 415 was_used_on_page_ = false;
416 weak_factory_.InvalidateWeakPtrs(); 416 weak_factory_.InvalidateWeakPtrs();
417 } 417 }
418 418
419 void ExtensionActionRunner::OnExtensionUnloaded( 419 void ExtensionActionRunner::OnExtensionUnloaded(
420 content::BrowserContext* browser_context, 420 content::BrowserContext* browser_context,
421 const Extension* extension, 421 const Extension* extension,
422 UnloadedExtensionInfo::Reason reason) { 422 UnloadedExtensionInfo::Reason reason) {
423 PendingScriptMap::iterator iter = pending_scripts_.find(extension->id()); 423 PendingScriptMap::iterator iter = pending_scripts_.find(extension->id());
424 if (iter != pending_scripts_.end()) { 424 if (iter != pending_scripts_.end()) {
425 pending_scripts_.erase(iter); 425 pending_scripts_.erase(iter);
426 ExtensionActionAPI::Get(browser_context_) 426 ExtensionActionAPI::Get(browser_context_)
427 ->NotifyPageActionsChanged(web_contents()); 427 ->NotifyPageActionsChanged(web_contents());
428 } 428 }
429 } 429 }
430 430
431 } // namespace extensions 431 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_navigation/web_navigation_api.cc ('k') | chrome/browser/extensions/tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698