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

Side by Side Diff: chrome/browser/automation/automation_util.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replace missing extension_system include Created 8 years 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 (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 "chrome/browser/automation/automation_util.h" 5 #include "chrome/browser/automation/automation_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 return true; 591 return true;
592 } 592 }
593 593
594 bool GetExtensionForId( 594 bool GetExtensionForId(
595 const AutomationId& id, 595 const AutomationId& id,
596 Profile* profile, 596 Profile* profile,
597 const extensions::Extension** extension) { 597 const extensions::Extension** extension) {
598 if (id.type() != AutomationId::kTypeExtension) 598 if (id.type() != AutomationId::kTypeExtension)
599 return false; 599 return false;
600 ExtensionService* service = profile->GetExtensionService(); 600 ExtensionService* service = extensions::ExtensionSystem::Get(profile)->
601 extension_service();
601 const extensions::Extension* installed_extension = 602 const extensions::Extension* installed_extension =
602 service->GetInstalledExtension(id.id()); 603 service->GetInstalledExtension(id.id());
603 if (installed_extension) 604 if (installed_extension)
604 *extension = installed_extension; 605 *extension = installed_extension;
605 return !!installed_extension; 606 return !!installed_extension;
606 } 607 }
607 608
608 bool DoesObjectWithIdExist(const AutomationId& id, Profile* profile) { 609 bool DoesObjectWithIdExist(const AutomationId& id, Profile* profile) {
609 switch (id.type()) { 610 switch (id.type()) {
610 case AutomationId::kTypeTab: { 611 case AutomationId::kTypeTab: {
(...skipping 11 matching lines...) Expand all
622 const extensions::Extension* extension; 623 const extensions::Extension* extension;
623 return GetExtensionForId(id, profile, &extension); 624 return GetExtensionForId(id, profile, &extension);
624 } 625 }
625 default: 626 default:
626 break; 627 break;
627 } 628 }
628 return false; 629 return false;
629 } 630 }
630 631
631 } // namespace automation_util 632 } // namespace automation_util
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698