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

Side by Side Diff: tools/telemetry/telemetry/core/extension_to_load.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 import os 4 import os
5 5
6 from telemetry import crx_id 6 from telemetry.core.chrome import crx_id
7 7
8 class ExtensionPathNonExistentException(Exception): 8 class ExtensionPathNonExistentException(Exception):
9 pass 9 pass
10 10
11 class ExtensionToLoad(object): 11 class ExtensionToLoad(object):
12 def __init__(self, path): 12 def __init__(self, path):
13 if not os.path.isdir(path): 13 if not os.path.isdir(path):
14 raise ExtensionPathNonExistentException( 14 raise ExtensionPathNonExistentException(
15 'Extension path not a directory %s' % path) 15 'Extension path not a directory %s' % path)
16 self.path = path 16 self.path = path
17 17
18 def extension_id(self): 18 def extension_id(self):
19 return crx_id.GetCRXAppID(os.path.abspath(self.path)) 19 return crx_id.GetCRXAppID(os.path.abspath(self.path))
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/extension_page.py ('k') | tools/telemetry/telemetry/core/extension_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698