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

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

Issue 7618037: base: Rename FileEnumerator::FILE_TYPE to FileEnumerator::FileType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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
« no previous file with comments | « base/test/test_file_util_posix.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 *unpacker_->parsed_manifest()); 120 *unpacker_->parsed_manifest());
121 } 121 }
122 122
123 FilePath GetInstallPath() { 123 FilePath GetInstallPath() {
124 return temp_dir_.path().AppendASCII( 124 return temp_dir_.path().AppendASCII(
125 extension_filenames::kTempExtensionName); 125 extension_filenames::kTempExtensionName);
126 } 126 }
127 127
128 bool TempFilesRemoved() { 128 bool TempFilesRemoved() {
129 // Check that temporary files were cleaned up. 129 // Check that temporary files were cleaned up.
130 file_util::FileEnumerator::FILE_TYPE files_and_dirs = 130 file_util::FileEnumerator::FileType files_and_dirs =
131 static_cast<file_util::FileEnumerator::FILE_TYPE>( 131 static_cast<file_util::FileEnumerator::FileType>(
132 file_util::FileEnumerator::DIRECTORIES | 132 file_util::FileEnumerator::DIRECTORIES |
133 file_util::FileEnumerator::FILES); 133 file_util::FileEnumerator::FILES);
134 134
135 file_util::FileEnumerator temp_iterator( 135 file_util::FileEnumerator temp_iterator(
136 temp_path_, 136 temp_path_,
137 true, // recursive 137 true, // recursive
138 files_and_dirs 138 files_and_dirs
139 ); 139 );
140 int items_not_removed = 0; 140 int items_not_removed = 0;
141 FilePath item_in_temp; 141 FilePath item_in_temp;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 OnUnpackSucceeded(); 206 OnUnpackSucceeded();
207 207
208 // Check that there is newer _locales/en_US/messages.json file. 208 // Check that there is newer _locales/en_US/messages.json file.
209 base::PlatformFileInfo new_info; 209 base::PlatformFileInfo new_info;
210 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info)); 210 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info));
211 211
212 EXPECT_TRUE(new_info.last_modified > old_info.last_modified); 212 EXPECT_TRUE(new_info.last_modified > old_info.last_modified);
213 213
214 ASSERT_TRUE(TempFilesRemoved()); 214 ASSERT_TRUE(TempFilesRemoved());
215 } 215 }
OLDNEW
« no previous file with comments | « base/test/test_file_util_posix.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698