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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.h

Issue 8430033: Adds a webstorePrivate method for silently installing extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mihai Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 bool incognito_enabled, 36 bool incognito_enabled,
37 bool fileaccess_enabled); 37 bool fileaccess_enabled);
38 38
39 // Loads extension and imitates that it is a component extension. 39 // Loads extension and imitates that it is a component extension.
40 bool LoadExtensionAsComponent(const FilePath& path); 40 bool LoadExtensionAsComponent(const FilePath& path);
41 41
42 // Pack the extension in |dir_path| into a crx file and return its path. 42 // Pack the extension in |dir_path| into a crx file and return its path.
43 // Return an empty FilePath if there were errors. 43 // Return an empty FilePath if there were errors.
44 FilePath PackExtension(const FilePath& dir_path); 44 FilePath PackExtension(const FilePath& dir_path);
45 45
46 // Pack the extension in |dir_path| into a crx file at |crx_path|, using the
47 // key |pem_path|. If |pem_path| does not exist, create a new key at
48 // |pem_out_path|.
49 // Return the path to the crx file, or an empty FilePath if there were errors.
50 FilePath PackExtensionWithOptions(const FilePath& dir_path,
51 const FilePath& crx_path,
52 const FilePath& pem_path,
53 const FilePath& pem_out_path);
54
46 // |expected_change| indicates how many extensions should be installed (or 55 // |expected_change| indicates how many extensions should be installed (or
47 // disabled, if negative). 56 // disabled, if negative).
48 // 1 means you expect a new install, 0 means you expect an upgrade, -1 means 57 // 1 means you expect a new install, 0 means you expect an upgrade, -1 means
49 // you expect a failed upgrade. 58 // you expect a failed upgrade.
50 bool InstallExtension(const FilePath& path, int expected_change) { 59 bool InstallExtension(const FilePath& path, int expected_change) {
51 return InstallOrUpdateExtension("", path, INSTALL_UI_TYPE_NONE, 60 return InstallOrUpdateExtension("", path, INSTALL_UI_TYPE_NONE,
52 expected_change); 61 expected_change);
53 } 62 }
54 63
55 // Installs extension as if it came from the Chrome Webstore. 64 // Installs extension as if it came from the Chrome Webstore.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // When waiting for page action count to change, we wait until it reaches this 161 // When waiting for page action count to change, we wait until it reaches this
153 // value. 162 // value.
154 int target_page_action_count_; 163 int target_page_action_count_;
155 164
156 // When waiting for visible page action count to change, we wait until it 165 // When waiting for visible page action count to change, we wait until it
157 // reaches this value. 166 // reaches this value.
158 int target_visible_page_action_count_; 167 int target_visible_page_action_count_;
159 }; 168 };
160 169
161 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_ 170 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSERTEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698