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

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

Issue 3387018: The return value of ClosePlatformFile() was reversed in r59041. Most... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « base/platform_file.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/database/database_tracker.h" 5 #include "webkit/database/database_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/sql/connection.h" 10 #include "app/sql/connection.h"
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 } 622 }
623 623
624 bool DatabaseTracker::CloseIncognitoFileHandle(const string16& vfs_file_name) { 624 bool DatabaseTracker::CloseIncognitoFileHandle(const string16& vfs_file_name) {
625 DCHECK(is_incognito_); 625 DCHECK(is_incognito_);
626 DCHECK(incognito_file_handles_.find(vfs_file_name) != 626 DCHECK(incognito_file_handles_.find(vfs_file_name) !=
627 incognito_file_handles_.end()); 627 incognito_file_handles_.end());
628 628
629 bool handle_closed = false; 629 bool handle_closed = false;
630 FileHandlesMap::iterator it = incognito_file_handles_.find(vfs_file_name); 630 FileHandlesMap::iterator it = incognito_file_handles_.find(vfs_file_name);
631 if (it != incognito_file_handles_.end()) { 631 if (it != incognito_file_handles_.end()) {
632 handle_closed = !base::ClosePlatformFile(it->second); 632 handle_closed = base::ClosePlatformFile(it->second);
633 if (handle_closed) 633 if (handle_closed)
634 incognito_file_handles_.erase(it); 634 incognito_file_handles_.erase(it);
635 } 635 }
636 return handle_closed; 636 return handle_closed;
637 } 637 }
638 638
639 bool DatabaseTracker::HasSavedIncognitoFileHandle( 639 bool DatabaseTracker::HasSavedIncognitoFileHandle(
640 const string16& vfs_file_name) const { 640 const string16& vfs_file_name) const {
641 return (incognito_file_handles_.find(vfs_file_name) != 641 return (incognito_file_handles_.find(vfs_file_name) !=
642 incognito_file_handles_.end()); 642 incognito_file_handles_.end());
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 file_path = file_enumerator.Next()) { 687 file_path = file_enumerator.Next()) {
688 if (file_path.BaseName() != FilePath(kTrackerDatabaseFileName)) { 688 if (file_path.BaseName() != FilePath(kTrackerDatabaseFileName)) {
689 if (!StartsWith(file_path.BaseName().ToWStringHack(), 689 if (!StartsWith(file_path.BaseName().ToWStringHack(),
690 ASCIIToWide(kExtensionOriginIdentifierPrefix), true)) 690 ASCIIToWide(kExtensionOriginIdentifierPrefix), true))
691 file_util::Delete(file_path, true); 691 file_util::Delete(file_path, true);
692 } 692 }
693 } 693 }
694 } 694 }
695 695
696 } // namespace webkit_database 696 } // namespace webkit_database
OLDNEW
« no previous file with comments | « base/platform_file.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698