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

Side by Side Diff: content/browser/fileapi/file_system_dir_url_request_job_unittest.cc

Issue 1354363002: Cleanup: Pass std::string as const reference from content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "storage/browser/fileapi/file_system_dir_url_request_job.h" 5 #include "storage/browser/fileapi/file_system_dir_url_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 icu::UnicodeString date_ustr(match.group(5, status)); 274 icu::UnicodeString date_ustr(match.group(5, status));
275 scoped_ptr<icu::DateFormat> formatter( 275 scoped_ptr<icu::DateFormat> formatter(
276 icu::DateFormat::createDateTimeInstance(icu::DateFormat::kShort)); 276 icu::DateFormat::createDateTimeInstance(icu::DateFormat::kShort));
277 UErrorCode parse_status = U_ZERO_ERROR; 277 UErrorCode parse_status = U_ZERO_ERROR;
278 UDate udate = formatter->parse(date_ustr, parse_status); 278 UDate udate = formatter->parse(date_ustr, parse_status);
279 EXPECT_TRUE(U_SUCCESS(parse_status)); 279 EXPECT_TRUE(U_SUCCESS(parse_status));
280 base::Time date = base::Time::FromJsTime(udate); 280 base::Time date = base::Time::FromJsTime(udate);
281 EXPECT_FALSE(date.is_null()); 281 EXPECT_FALSE(date.is_null());
282 } 282 }
283 283
284 GURL CreateFileSystemURL(const std::string path) { 284 GURL CreateFileSystemURL(const std::string& path) {
285 return GURL(kFileSystemURLPrefix + path); 285 return GURL(kFileSystemURLPrefix + path);
286 } 286 }
287 287
288 storage::FileSystemFileUtil* file_util() { 288 storage::FileSystemFileUtil* file_util() {
289 return file_system_context_->sandbox_delegate()->sync_file_util(); 289 return file_system_context_->sandbox_delegate()->sync_file_util();
290 } 290 }
291 291
292 // Put the message loop at the top, so that it's the last thing deleted. 292 // Put the message loop at the top, so that it's the last thing deleted.
293 // Delete all task runner objects before the MessageLoop, to help prevent 293 // Delete all task runner objects before the MessageLoop, to help prevent
294 // leaks caused by tasks posted during shutdown. 294 // leaks caused by tasks posted during shutdown.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 ASSERT_FALSE(request_->status().is_success()); 450 ASSERT_FALSE(request_->status().is_success());
451 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); 451 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
452 452
453 ASSERT_FALSE( 453 ASSERT_FALSE(
454 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 454 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
455 kValidExternalMountPoint)); 455 kValidExternalMountPoint));
456 } 456 }
457 457
458 } // namespace 458 } // namespace
459 } // namespace content 459 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/device_monitor_mac.mm ('k') | content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698