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

Side by Side Diff: chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc

Issue 15239002: Move Extension and PermissionsData to extensions/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
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/ui/ash/launcher/launcher_app_tab_helper.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_app_tab_helper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
14 #include "chrome/common/extensions/extension.h"
15 #include "content/public/browser/navigation_entry.h" 14 #include "content/public/browser/navigation_entry.h"
16 #include "content/public/browser/web_contents.h" 15 #include "content/public/browser/web_contents.h"
16 #include "extensions/common/extension.h"
17 17
18 namespace { 18 namespace {
19 19
20 const extensions::Extension* GetExtensionForTab(Profile* profile, 20 const extensions::Extension* GetExtensionForTab(Profile* profile,
21 content::WebContents* tab) { 21 content::WebContents* tab) {
22 ExtensionService* extension_service = profile->GetExtensionService(); 22 ExtensionService* extension_service = profile->GetExtensionService();
23 if (!extension_service || !extension_service->extensions_enabled()) 23 if (!extension_service || !extension_service->extensions_enabled())
24 return NULL; 24 return NULL;
25 Browser* browser = chrome::FindBrowserWithWebContents(tab); 25 Browser* browser = chrome::FindBrowserWithWebContents(tab);
26 DCHECK(browser); 26 DCHECK(browser);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return extension ? extension->id() : std::string(); 68 return extension ? extension->id() : std::string();
69 } 69 }
70 70
71 bool LauncherAppTabHelper::IsValidIDForCurrentUser(const std::string& id) { 71 bool LauncherAppTabHelper::IsValidIDForCurrentUser(const std::string& id) {
72 return GetExtensionByID(profile_, id) != NULL; 72 return GetExtensionByID(profile_, id) != NULL;
73 } 73 }
74 74
75 void LauncherAppTabHelper::SetCurrentUser(Profile* profile) { 75 void LauncherAppTabHelper::SetCurrentUser(Profile* profile) {
76 profile_ = profile; 76 profile_ = profile;
77 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698