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

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

Issue 16950028: Move file_util::Delete to the base namespace (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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 file_util::CopyFile(src_dir.AppendASCII("Preferences"), 73 file_util::CopyFile(src_dir.AppendASCII("Preferences"),
74 preferences_file_); 74 preferences_file_);
75 file_util::CopyDirectory(src_dir.AppendASCII("Extensions"), 75 file_util::CopyDirectory(src_dir.AppendASCII("Extensions"),
76 profile_dir, true); // recursive 76 profile_dir, true); // recursive
77 } 77 }
78 return true; 78 return true;
79 } 79 }
80 80
81 virtual void TearDown() { 81 virtual void TearDown() {
82 EXPECT_TRUE(file_util::Delete(preferences_file_, false)); 82 EXPECT_TRUE(base::Delete(preferences_file_, false));
83 83
84 // TODO(phajdan.jr): Check return values of the functions below, carefully. 84 // TODO(phajdan.jr): Check return values of the functions below, carefully.
85 file_util::Delete(user_scripts_dir_, true); 85 base::Delete(user_scripts_dir_, true);
86 file_util::Delete(extensions_dir_, true); 86 base::Delete(extensions_dir_, true);
87 87
88 InProcessBrowserTest::TearDown(); 88 InProcessBrowserTest::TearDown();
89 } 89 }
90 90
91 void WaitForServicesToStart(int num_expected_extensions, 91 void WaitForServicesToStart(int num_expected_extensions,
92 bool expect_extensions_enabled) { 92 bool expect_extensions_enabled) {
93 ExtensionService* service = extensions::ExtensionSystem::Get( 93 ExtensionService* service = extensions::ExtensionSystem::Get(
94 browser()->profile())->extension_service(); 94 browser()->profile())->extension_service();
95 95
96 // Count the number of non-component extensions. 96 // Count the number of non-component extensions.
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 .AppendASCII("extensions") 269 .AppendASCII("extensions")
270 .AppendASCII("app2"); 270 .AppendASCII("app2");
271 load_extensions_.push_back(fourth_extension_path.value()); 271 load_extensions_.push_back(fourth_extension_path.value());
272 } 272 }
273 }; 273 };
274 274
275 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { 275 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) {
276 WaitForServicesToStart(4, true); 276 WaitForServicesToStart(4, true);
277 TestInjection(true, true); 277 TestInjection(true, true);
278 } 278 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/sandboxed_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698