Commit d7754f5f authored by kinaba@chromium.org's avatar kinaba@chromium.org

gdata: Various comment fixes (mostly typos).

BUG=none

Review URL: https://chromiumcodereview.appspot.com/10821124

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149389 0039d316-1c4b-4281-b951-d872f2087c98
parent 4425d289
...@@ -69,7 +69,7 @@ int64 GetAmountOfFreeDiskSpace() { ...@@ -69,7 +69,7 @@ int64 GetAmountOfFreeDiskSpace() {
// bytes, while keeping kMinFreeSpace bytes on the disk. // bytes, while keeping kMinFreeSpace bytes on the disk.
bool HasEnoughSpaceFor(int64 num_bytes) { bool HasEnoughSpaceFor(int64 num_bytes) {
int64 free_space = GetAmountOfFreeDiskSpace(); int64 free_space = GetAmountOfFreeDiskSpace();
// Substract this as if this portion does not exist. // Subtract this as if this portion does not exist.
free_space -= kMinFreeSpace; free_space -= kMinFreeSpace;
return (free_space >= num_bytes); return (free_space >= num_bytes);
} }
...@@ -95,7 +95,7 @@ void InitCachePaths(const std::vector<FilePath>& cache_paths) { ...@@ -95,7 +95,7 @@ void InitCachePaths(const std::vector<FilePath>& cache_paths) {
} }
// Remove all files under the given directory, non-recursively. // Remove all files under the given directory, non-recursively.
// Do not remove recursively as we don't want to touch <gache>/tmp/downloads, // Do not remove recursively as we don't want to touch <gcache>/tmp/downloads,
// which is used for user initiated downloads like "Save As" // which is used for user initiated downloads like "Save As"
void RemoveAllFiles(const FilePath& directory) { void RemoveAllFiles(const FilePath& directory) {
using file_util::FileEnumerator; using file_util::FileEnumerator;
......
...@@ -168,7 +168,7 @@ class GDataCache { ...@@ -168,7 +168,7 @@ class GDataCache {
void GetResourceIdsOfBacklogOnUIThread( void GetResourceIdsOfBacklogOnUIThread(
const GetResourceIdsOfBacklogCallback& callback); const GetResourceIdsOfBacklogCallback& callback);
// Gets the resource IDs of all exsiting (i.e. cached locally) pinned // Gets the resource IDs of all existing (i.e. cached locally) pinned
// files, including pinned dirty files. // files, including pinned dirty files.
// //
// Must be called on UI thread. |callback| is run on UI thread. // Must be called on UI thread. |callback| is run on UI thread.
......
...@@ -65,13 +65,13 @@ typedef struct { ...@@ -65,13 +65,13 @@ typedef struct {
SerializationTimetable kSerializeTimetable[] = { SerializationTimetable kSerializeTimetable[] = {
#ifndef NDEBUG #ifndef NDEBUG
{0.5, 0}, // Less than 0.5MB, dump immediately. {0.5, 0}, // Less than 0.5MB, dump immediately.
{-1, 1}, // Any size, dump if older than 1 minue. {-1, 1}, // Any size, dump if older than 1 minute.
#else #else
{0.5, 0}, // Less than 0.5MB, dump immediately. {0.5, 0}, // Less than 0.5MB, dump immediately.
{1.0, 15}, // Less than 1.0MB, dump after 15 minutes. {1.0, 15}, // Less than 1.0MB, dump after 15 minutes.
{2.0, 30}, {2.0, 30},
{4.0, 60}, {4.0, 60},
{-1, 120}, // Any size, dump if older than 120 minues. {-1, 120}, // Any size, dump if older than 120 minutes.
#endif #endif
}; };
......
...@@ -305,7 +305,7 @@ class GDataFileSystemInterface { ...@@ -305,7 +305,7 @@ class GDataFileSystemInterface {
// In particular, this function is used to get the latest thumbnail // In particular, this function is used to get the latest thumbnail
// URLs. Thumbnail URLs change periodically even if contents of files are // URLs. Thumbnail URLs change periodically even if contents of files are
// not changed, hence we should get the new thumbnail URLs manually if we // not changed, hence we should get the new thumbnail URLs manually if we
// detect that the existing thumnail URLs are stale. // detect that the existing thumbnail URLs are stale.
// //
// Upon success, the metadata of files in the target directory is updated, // Upon success, the metadata of files in the target directory is updated,
// and the change is notified via Observer::OnDirectoryChanged(). Note that // and the change is notified via Observer::OnDirectoryChanged(). Note that
......
...@@ -33,7 +33,7 @@ namespace { ...@@ -33,7 +33,7 @@ namespace {
const char kGDataRootDirectory[] = "drive"; const char kGDataRootDirectory[] = "drive";
const char kFeedField[] = "feed"; const char kFeedField[] = "feed";
// Helper function that creates platform file on bocking IO thread pool. // Helper function that creates platform file on blocking IO thread pool.
void OpenPlatformFileOnIOPool(const FilePath& local_path, void OpenPlatformFileOnIOPool(const FilePath& local_path,
int file_flags, int file_flags,
base::PlatformFile* platform_file, base::PlatformFile* platform_file,
......
...@@ -182,10 +182,10 @@ class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface { ...@@ -182,10 +182,10 @@ class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
base::PlatformFile* platform_file, base::PlatformFile* platform_file,
base::PlatformFileError* truncate_result); base::PlatformFileError* truncate_result);
// GDataFileSystemProxy is owned by Profile, which outlives // GDataFileSystem is owned by Profile, which outlives GDataFileSystemProxy,
// GDataFileSystemProxy, which is owned by CrosMountPointProvider (i.e. by // which is owned by CrosMountPointProvider (i.e. by the time Profile is
// the time Profile is removed, the file manager is already gone). Hence // removed, the file manager is already gone). Hence it's safe to use this as
// it's safe to use this as a raw pointer. // a raw pointer.
GDataFileSystemInterface* file_system_; GDataFileSystemInterface* file_system_;
}; };
......
...@@ -159,7 +159,7 @@ class MockGDataUploader : public GDataUploaderInterface { ...@@ -159,7 +159,7 @@ class MockGDataUploader : public GDataUploaderInterface {
DocumentEntry::ExtractAndParse(*value)); DocumentEntry::ExtractAndParse(*value));
upload_file_info->entry = document_entry.Pass(); upload_file_info->entry = document_entry.Pass();
// Run the complection callback. // Run the completion callback.
const UploadFileInfo::UploadCompletionCallback callback = const UploadFileInfo::UploadCompletionCallback callback =
upload_file_info->completion_callback; upload_file_info->completion_callback;
if (!callback.is_null()) if (!callback.is_null())
...@@ -602,7 +602,7 @@ class GDataFileSystemTest : public testing::Test { ...@@ -602,7 +602,7 @@ class GDataFileSystemTest : public testing::Test {
std::string(), std::string(),
GDataCache::CACHE_TYPE_PINNED, GDataCache::CACHE_TYPE_PINNED,
GDataCache::CACHED_FILE_FROM_SERVER); GDataCache::CACHED_FILE_FROM_SERVER);
// Check that pin symlink exists, without deferencing to target path. // Check that pin symlink exists, without dereferencing to target path.
exists = file_util::IsLink(symlink_path); exists = file_util::IsLink(symlink_path);
if (test_util::ToCacheEntry(expected_cache_state_).is_pinned()) { if (test_util::ToCacheEntry(expected_cache_state_).is_pinned()) {
EXPECT_TRUE(exists); EXPECT_TRUE(exists);
...@@ -622,7 +622,7 @@ class GDataFileSystemTest : public testing::Test { ...@@ -622,7 +622,7 @@ class GDataFileSystemTest : public testing::Test {
std::string(), std::string(),
GDataCache::CACHE_TYPE_OUTGOING, GDataCache::CACHE_TYPE_OUTGOING,
GDataCache::CACHED_FILE_FROM_SERVER); GDataCache::CACHED_FILE_FROM_SERVER);
// Check that outgoing symlink exists, without deferencing to target path. // Check that outgoing symlink exists, without dereferencing to target path.
exists = file_util::IsLink(symlink_path); exists = file_util::IsLink(symlink_path);
if (expect_outgoing_symlink_ && if (expect_outgoing_symlink_ &&
test_util::ToCacheEntry(expected_cache_state_).is_dirty()) { test_util::ToCacheEntry(expected_cache_state_).is_dirty()) {
...@@ -827,7 +827,7 @@ class GDataFileSystemTest : public testing::Test { ...@@ -827,7 +827,7 @@ class GDataFileSystemTest : public testing::Test {
MessageLoopForUI message_loop_; MessageLoopForUI message_loop_;
// The order of the test threads is important, do not change the order. // The order of the test threads is important, do not change the order.
// See also content/browser/browser_thread_imple.cc. // See also content/browser/browser_thread_impl.cc.
content::TestBrowserThread ui_thread_; content::TestBrowserThread ui_thread_;
content::TestBrowserThread io_thread_; content::TestBrowserThread io_thread_;
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
...@@ -1453,7 +1453,7 @@ TEST_F(GDataFileSystemTest, CopyFileToNonExistingDirectory) { ...@@ -1453,7 +1453,7 @@ TEST_F(GDataFileSystemTest, CopyFileToNonExistingDirectory) {
EXPECT_FALSE(EntryExists(dest_file_path)); EXPECT_FALSE(EntryExists(dest_file_path));
} }
// Test the case where the parent of |dest_file_path| is a existing file, // Test the case where the parent of |dest_file_path| is an existing file,
// not a directory. // not a directory.
TEST_F(GDataFileSystemTest, CopyFileToInvalidPath) { TEST_F(GDataFileSystemTest, CopyFileToInvalidPath) {
FilePath src_file_path(FILE_PATH_LITERAL("drive/Document 1.gdoc")); FilePath src_file_path(FILE_PATH_LITERAL("drive/Document 1.gdoc"));
......
...@@ -175,7 +175,7 @@ GDataEntry* GDataFile::FromDocumentEntry( ...@@ -175,7 +175,7 @@ GDataEntry* GDataFile::FromDocumentEntry(
file->file_info_.size = doc->file_size(); file->file_info_.size = doc->file_size();
file->file_md5_ = doc->file_md5(); file->file_md5_ = doc->file_md5();
// The resumable-edit-media link should only be present for regualar // The resumable-edit-media link should only be present for regular
// files as hosted documents are not uploadable. // files as hosted documents are not uploadable.
const Link* upload_link = doc->GetLinkByType(Link::RESUMABLE_EDIT_MEDIA); const Link* upload_link = doc->GetLinkByType(Link::RESUMABLE_EDIT_MEDIA);
if (upload_link) if (upload_link)
......
...@@ -23,7 +23,7 @@ namespace util { ...@@ -23,7 +23,7 @@ namespace util {
// Path constants. // Path constants.
// The extention for dirty files. The file names look like // The extension for dirty files. The file names look like
// "<resource-id>.local". // "<resource-id>.local".
const char kLocallyModifiedFileExtension[] = "local"; const char kLocallyModifiedFileExtension[] = "local";
// The extension for mounted files. The file names look like // The extension for mounted files. The file names look like
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment