Moved some functions off ExtensionService into a new file extension_util.

These functions do not need any internal state of ExtensionService, so
do not need to be on the class itself. This makes it easier to understand
what ExtensionService is doing (as it now does less) and easier to change.

[email protected]
BUG=298537

Review URL: https://codereview.chromium.org/25366003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229223 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/context_menu_matcher.cc b/chrome/browser/extensions/context_menu_matcher.cc
index 950461d..c125660 100644
--- a/chrome/browser/extensions/context_menu_matcher.cc
+++ b/chrome/browser/extensions/context_menu_matcher.cc
@@ -7,6 +7,7 @@
 #include "chrome/browser/extensions/context_menu_matcher.h"
 #include "chrome/browser/extensions/extension_service.h"
 #include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/extensions/extension_util.h"
 #include "chrome/browser/profiles/profile.h"
 #include "content/public/common/context_menu_params.h"
 #include "ui/gfx/favicon_size.h"
@@ -161,7 +162,7 @@
   if (!all_items || all_items->empty())
     return false;
 
-  *can_cross_incognito = service->CanCrossIncognito(*extension);
+  *can_cross_incognito = extension_util::CanCrossIncognito(*extension, service);
   items = GetRelevantExtensionItems(*all_items,
                                     *can_cross_incognito);