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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 10408071: gdata: Fix a crash when adding a new file to a new but deleted directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.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) 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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 // Updates whole directory structure feeds collected in |feed_list|. 887 // Updates whole directory structure feeds collected in |feed_list|.
888 // On success, returns PLATFORM_FILE_OK. Record file statistics as UMA 888 // On success, returns PLATFORM_FILE_OK. Record file statistics as UMA
889 // histograms. 889 // histograms.
890 base::PlatformFileError UpdateFromFeed( 890 base::PlatformFileError UpdateFromFeed(
891 const std::vector<DocumentFeed*>& feed_list, 891 const std::vector<DocumentFeed*>& feed_list,
892 ContentOrigin origin, 892 ContentOrigin origin,
893 int largest_changestamp, 893 int largest_changestamp,
894 int root_feed_changestamp); 894 int root_feed_changestamp);
895 895
896 // Applies the pre-processed feed from |file_map| map onto the file system. 896 // Applies the pre-processed feed from |file_map| map onto the file system.
897 // All entries in |file_map| will be erased (i.e. the map becomes empty),
898 // and values are deleted.
897 void ApplyFeedFromFileUrlMap(bool is_delta_feed, 899 void ApplyFeedFromFileUrlMap(bool is_delta_feed,
898 int feed_changestamp, 900 int feed_changestamp,
899 const FileResourceIdMap& file_map); 901 FileResourceIdMap* file_map);
900 902
901 // Finds directory where new |file| should be added to during feed processing. 903 // Finds directory where new |file| should be added to during feed processing.
902 // |orphaned_entries_dir| collects files/dirs that don't have a parent in 904 // |orphaned_entries_dir| collects files/dirs that don't have a parent in
903 // either locally cached file system or in this new feed. 905 // either locally cached file system or in this new feed.
904 GDataDirectory* FindDirectoryForNewEntry( 906 GDataDirectory* FindDirectoryForNewEntry(
905 GDataEntry* new_entry, 907 GDataEntry* new_entry,
906 const FileResourceIdMap& file_map, 908 const FileResourceIdMap& file_map,
907 GDataRootDirectory* orphaned_entries); 909 GDataRootDirectory* orphaned_entries);
908 910
909 // Converts list of document feeds from collected feeds into 911 // Converts list of document feeds from collected feeds into
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 }; 1501 };
1500 1502
1501 // Sets the free disk space getter for testing. 1503 // Sets the free disk space getter for testing.
1502 // The existing getter is deleted. 1504 // The existing getter is deleted.
1503 void SetFreeDiskSpaceGetterForTesting( 1505 void SetFreeDiskSpaceGetterForTesting(
1504 FreeDiskSpaceGetterInterface* getter); 1506 FreeDiskSpaceGetterInterface* getter);
1505 1507
1506 } // namespace gdata 1508 } // namespace gdata
1507 1509
1508 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 1510 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698