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

Side by Side Diff: chrome/browser/media_galleries/media_folder_finder_unittest.cc

Issue 189333004: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/media_galleries/media_folder_finder.h" 5 #include "chrome/browser/media_galleries/media_folder_finder.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 default: 112 default:
113 NOTREACHED(); 113 NOTREACHED();
114 return; 114 return;
115 } 115 }
116 if (big) 116 if (big)
117 filesize *= 100000; 117 filesize *= 100000;
118 118
119 for (size_t i = 0; i < count; ++i) { 119 for (size_t i = 0; i < count; ++i) {
120 base::FilePath test_file(parent_dir.AppendASCII("dummy." + extension)); 120 base::FilePath test_file(parent_dir.AppendASCII("dummy." + extension));
121 int uniquifier = 121 int uniquifier =
122 file_util::GetUniquePathNumber(test_file, 122 base::GetUniquePathNumber(test_file, base::FilePath::StringType());
123 base::FilePath::StringType());
124 if (uniquifier > 0) { 123 if (uniquifier > 0) {
125 test_file = test_file.InsertBeforeExtensionASCII( 124 test_file = test_file.InsertBeforeExtensionASCII(
126 base::StringPrintf(" (%d)", uniquifier)); 125 base::StringPrintf(" (%d)", uniquifier));
127 filesize += uniquifier; 126 filesize += uniquifier;
128 } 127 }
129 128
130 std::string dummy_data; 129 std::string dummy_data;
131 dummy_data.resize(filesize); 130 dummy_data.resize(filesize);
132 131
133 int bytes_written = 132 int bytes_written =
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 402
404 // |fake_home_dir| and its ancestors do not show up in results. 403 // |fake_home_dir| and its ancestors do not show up in results.
405 expected_results.erase(fake_dir()); 404 expected_results.erase(fake_dir());
406 expected_results.erase(fake_home_dir); 405 expected_results.erase(fake_home_dir);
407 406
408 CreateMediaFolderFinder(folders, true, expected_results); 407 CreateMediaFolderFinder(folders, true, expected_results);
409 StartScan(); 408 StartScan();
410 RunLoopUntilReceivedCallback(); 409 RunLoopUntilReceivedCallback();
411 DeleteMediaFolderFinder(); 410 DeleteMediaFolderFinder();
412 } 411 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_installer.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698