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

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

Issue 10855002: Change the type of file_type parameter to int, as the parameter actually takes or-ed bitmasks, (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix missing comma. Created 8 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
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 "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/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 *unpacker_->parsed_manifest()); 128 *unpacker_->parsed_manifest());
129 } 129 }
130 130
131 FilePath GetInstallPath() { 131 FilePath GetInstallPath() {
132 return temp_dir_.path().AppendASCII( 132 return temp_dir_.path().AppendASCII(
133 extension_filenames::kTempExtensionName); 133 extension_filenames::kTempExtensionName);
134 } 134 }
135 135
136 bool TempFilesRemoved() { 136 bool TempFilesRemoved() {
137 // Check that temporary files were cleaned up. 137 // Check that temporary files were cleaned up.
138 file_util::FileEnumerator::FileType files_and_dirs = 138 int files_and_dirs = file_util::FileEnumerator::DIRECTORIES |
139 static_cast<file_util::FileEnumerator::FileType>( 139 file_util::FileEnumerator::FILES;
140 file_util::FileEnumerator::DIRECTORIES |
141 file_util::FileEnumerator::FILES);
142 140
143 file_util::FileEnumerator temp_iterator( 141 file_util::FileEnumerator temp_iterator(
144 temp_path_, 142 temp_path_,
145 true, // recursive 143 true, // recursive
146 files_and_dirs 144 files_and_dirs
147 ); 145 );
148 int items_not_removed = 0; 146 int items_not_removed = 0;
149 FilePath item_in_temp; 147 FilePath item_in_temp;
150 item_in_temp = temp_iterator.Next(); 148 item_in_temp = temp_iterator.Next();
151 while (!item_in_temp.value().empty()) { 149 while (!item_in_temp.value().empty()) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Check that there is newer _locales/en_US/messages.json file. 214 // Check that there is newer _locales/en_US/messages.json file.
217 base::PlatformFileInfo new_info; 215 base::PlatformFileInfo new_info;
218 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info)); 216 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info));
219 217
220 EXPECT_TRUE(new_info.last_modified > old_info.last_modified); 218 EXPECT_TRUE(new_info.last_modified > old_info.last_modified);
221 219
222 ASSERT_TRUE(TempFilesRemoved()); 220 ASSERT_TRUE(TempFilesRemoved());
223 } 221 }
224 222
225 } // namespace extensions 223 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc ('k') | chrome/browser/policy/app_pack_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698