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

Side by Side Diff: webkit/browser/fileapi/sandbox_origin_database.cc

Issue 12310041: experiment with -Wimplicit-fallthrough Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: rebase 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/fileapi/sandbox_origin_database.h" 5 #include "webkit/browser/fileapi/sandbox_origin_database.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 LOG(WARNING) << "Attempting to repair SandboxOriginDatabase."; 100 LOG(WARNING) << "Attempting to repair SandboxOriginDatabase.";
101 101
102 if (RepairDatabase(path)) { 102 if (RepairDatabase(path)) {
103 UMA_HISTOGRAM_ENUMERATION(kDatabaseRepairHistogramLabel, 103 UMA_HISTOGRAM_ENUMERATION(kDatabaseRepairHistogramLabel,
104 DB_REPAIR_SUCCEEDED, DB_REPAIR_MAX); 104 DB_REPAIR_SUCCEEDED, DB_REPAIR_MAX);
105 LOG(WARNING) << "Repairing SandboxOriginDatabase completed."; 105 LOG(WARNING) << "Repairing SandboxOriginDatabase completed.";
106 return true; 106 return true;
107 } 107 }
108 UMA_HISTOGRAM_ENUMERATION(kDatabaseRepairHistogramLabel, 108 UMA_HISTOGRAM_ENUMERATION(kDatabaseRepairHistogramLabel,
109 DB_REPAIR_FAILED, DB_REPAIR_MAX); 109 DB_REPAIR_FAILED, DB_REPAIR_MAX);
110 // fall through 110 FALLTHROUGH_INTENDED;
111 case DELETE_ON_CORRUPTION: 111 case DELETE_ON_CORRUPTION:
112 if (!base::DeleteFile(file_system_directory_, true)) 112 if (!base::DeleteFile(file_system_directory_, true))
113 return false; 113 return false;
114 if (!base::CreateDirectory(file_system_directory_)) 114 if (!base::CreateDirectory(file_system_directory_))
115 return false; 115 return false;
116 return Init(init_option, FAIL_ON_CORRUPTION); 116 return Init(init_option, FAIL_ON_CORRUPTION);
117 } 117 }
118 NOTREACHED(); 118 NOTREACHED();
119 return false; 119 return false;
120 } 120 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 db_->Put(leveldb::WriteOptions(), LastPathKey(), std::string("-1")); 332 db_->Put(leveldb::WriteOptions(), LastPathKey(), std::string("-1"));
333 if (!status.ok()) { 333 if (!status.ok()) {
334 HandleError(FROM_HERE, status); 334 HandleError(FROM_HERE, status);
335 return false; 335 return false;
336 } 336 }
337 *number = -1; 337 *number = -1;
338 return true; 338 return true;
339 } 339 }
340 340
341 } // namespace fileapi 341 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_directory_database.cc ('k') | webkit/common/fileapi/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698