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

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

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 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/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 std::string extension_id = service->component_loader()->Add(manifest, path); 226 std::string extension_id = service->component_loader()->Add(manifest, path);
227 const Extension* extension = service->extensions()->GetByID(extension_id); 227 const Extension* extension = service->extensions()->GetByID(extension_id);
228 if (!extension) 228 if (!extension)
229 return NULL; 229 return NULL;
230 last_loaded_extension_id_ = extension->id(); 230 last_loaded_extension_id_ = extension->id();
231 return extension; 231 return extension;
232 } 232 }
233 233
234 const Extension* ExtensionBrowserTest::LoadExtensionAsComponent( 234 const Extension* ExtensionBrowserTest::LoadExtensionAsComponent(
235 const base::FilePath& path) { 235 const base::FilePath& path) {
236 return LoadExtensionAsComponentWithManifest(path, 236 return LoadExtensionAsComponentWithManifest(
237 extensions::kManifestFilename); 237 path, extensions::filenames::kManifestFilename);
238 } 238 }
239 239
240 base::FilePath ExtensionBrowserTest::PackExtension( 240 base::FilePath ExtensionBrowserTest::PackExtension(
241 const base::FilePath& dir_path) { 241 const base::FilePath& dir_path) {
242 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx"); 242 base::FilePath crx_path = temp_dir_.path().AppendASCII("temp.crx");
243 if (!base::DeleteFile(crx_path, false)) { 243 if (!base::DeleteFile(crx_path, false)) {
244 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value(); 244 ADD_FAILURE() << "Failed to delete crx: " << crx_path.value();
245 return base::FilePath(); 245 return base::FilePath();
246 } 246 }
247 247
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 case content::NOTIFICATION_LOAD_STOP: 734 case content::NOTIFICATION_LOAD_STOP:
735 VLOG(1) << "Got LOAD_STOP notification."; 735 VLOG(1) << "Got LOAD_STOP notification.";
736 base::MessageLoopForUI::current()->Quit(); 736 base::MessageLoopForUI::current()->Quit();
737 break; 737 break;
738 738
739 default: 739 default:
740 NOTREACHED(); 740 NOTREACHED();
741 break; 741 break;
742 } 742 }
743 } 743 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698