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

Side by Side Diff: chrome/browser/extensions/api/terminal/terminal_extension_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/extensions/api/terminal/terminal_extension_helper.h" 5 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/extensions/extension.h" 9 #include "extensions/common/extension.h"
10 10
11 namespace { 11 namespace {
12 12
13 const char kCroshExtensionEntryPoint[] = "/html/crosh.html"; 13 const char kCroshExtensionEntryPoint[] = "/html/crosh.html";
14 14
15 const extensions::Extension* GetTerminalExtension(Profile* profile) { 15 const extensions::Extension* GetTerminalExtension(Profile* profile) {
16 // Search order for terminal extensions. 16 // Search order for terminal extensions.
17 // We prefer hterm-dev, then hterm, then the builtin crosh extension. 17 // We prefer hterm-dev, then hterm, then the builtin crosh extension.
18 static const char* kPossibleAppIds[] = { 18 static const char* kPossibleAppIds[] = {
19 extension_misc::kHTermDevAppId, 19 extension_misc::kHTermDevAppId,
(...skipping 21 matching lines...) Expand all
41 41
42 GURL TerminalExtensionHelper::GetCroshExtensionURL(Profile* profile) { 42 GURL TerminalExtensionHelper::GetCroshExtensionURL(Profile* profile) {
43 const extensions::Extension* extension = GetTerminalExtension(profile); 43 const extensions::Extension* extension = GetTerminalExtension(profile);
44 if (!extension) 44 if (!extension)
45 return GURL(); 45 return GURL();
46 46
47 return extension->GetResourceURL(kCroshExtensionEntryPoint); 47 return extension->GetResourceURL(kCroshExtensionEntryPoint);
48 } 48 }
49 49
50 } // namespace extensions 50 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698