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

Side by Side Diff: webkit/browser/database/database_tracker.cc

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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 (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 "webkit/browser/database/database_tracker.h" 5 #include "webkit/browser/database/database_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 continue; 684 continue;
685 } 685 }
686 686
687 std::vector<DatabaseDetails> details; 687 std::vector<DatabaseDetails> details;
688 if (!databases_table_-> 688 if (!databases_table_->
689 GetAllDatabaseDetailsForOriginIdentifier(*ori, &details)) 689 GetAllDatabaseDetailsForOriginIdentifier(*ori, &details))
690 rv = net::ERR_FAILED; 690 rv = net::ERR_FAILED;
691 for (std::vector<DatabaseDetails>::const_iterator db = details.begin(); 691 for (std::vector<DatabaseDetails>::const_iterator db = details.begin();
692 db != details.end(); ++db) { 692 db != details.end(); ++db) {
693 base::FilePath db_file = GetFullDBFilePath(*ori, db->database_name); 693 base::FilePath db_file = GetFullDBFilePath(*ori, db->database_name);
694 base::PlatformFileInfo file_info; 694 base::File::Info file_info;
695 base::GetFileInfo(db_file, &file_info); 695 base::GetFileInfo(db_file, &file_info);
696 if (file_info.last_modified < cutoff) 696 if (file_info.last_modified < cutoff)
697 continue; 697 continue;
698 698
699 // Check if the database is opened by any renderer. 699 // Check if the database is opened by any renderer.
700 if (database_connections_.IsDatabaseOpened(*ori, db->database_name)) 700 if (database_connections_.IsDatabaseOpened(*ori, db->database_name))
701 to_be_deleted[*ori].insert(db->database_name); 701 to_be_deleted[*ori].insert(db->database_name);
702 else 702 else
703 DeleteClosedDatabase(*ori, db->database_name); 703 DeleteClosedDatabase(*ori, db->database_name);
704 } 704 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 if (!db_tracker_thread_->BelongsToCurrentThread()) { 862 if (!db_tracker_thread_->BelongsToCurrentThread()) {
863 db_tracker_thread_->PostTask( 863 db_tracker_thread_->PostTask(
864 FROM_HERE, 864 FROM_HERE,
865 base::Bind(&DatabaseTracker::SetForceKeepSessionState, this)); 865 base::Bind(&DatabaseTracker::SetForceKeepSessionState, this));
866 return; 866 return;
867 } 867 }
868 force_keep_session_state_ = true; 868 force_keep_session_state_ = true;
869 } 869 }
870 870
871 } // namespace webkit_database 871 } // namespace webkit_database
OLDNEW
« no previous file with comments | « webkit/browser/blob/local_file_stream_reader_unittest.cc ('k') | webkit/browser/fileapi/native_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698