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

Side by Side Diff: third_party/leveldatabase/env_chromium_win.cc

Issue 416633002: Cleanup Chrome's LevelDB env to conform to C++ style guidelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The LevelDB Authors. All rights reserved. 1 // Copyright (c) 2013 The LevelDB 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. See the AUTHORS file for names of contributors. 3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 4
5 #include "third_party/leveldatabase/env_chromium_win.h"
6
5 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
6 #include "base/files/file.h" 8 #include "base/files/file.h"
7 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
8 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
9 #include "base/win/win_util.h" 11 #include "base/win/win_util.h"
10 #include "chromium_logger.h" 12 #include "third_party/leveldatabase/chromium_logger.h"
11 #include "env_chromium_stdio.h" 13 #include "third_party/leveldatabase/env_chromium_stdio.h"
12 #include "env_chromium_win.h"
13
14 using namespace leveldb;
15 14
16 namespace leveldb_env { 15 namespace leveldb_env {
17 16
18 namespace { 17 namespace {
19 18
20 static std::string GetWindowsErrorMessage(DWORD err) { 19 static std::string GetWindowsErrorMessage(DWORD err) {
21 LPTSTR errorText(NULL); 20 LPTSTR errorText(NULL);
22 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | 21 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER |
23 FORMAT_MESSAGE_IGNORE_INSERTS, 22 FORMAT_MESSAGE_IGNORE_INSERTS,
24 NULL, 23 NULL,
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 return Status::OK(); 345 return Status::OK();
347 } 346 }
348 } 347 }
349 348
350 void ChromiumEnvWin::RecordOSError(MethodID method, DWORD error) const { 349 void ChromiumEnvWin::RecordOSError(MethodID method, DWORD error) const {
351 RecordErrorAt(method); 350 RecordErrorAt(method);
352 GetOSErrorHistogram(method, ERANGE + 1)->Add(error); 351 GetOSErrorHistogram(method, ERANGE + 1)->Add(error);
353 } 352 }
354 353
355 } // namespace leveldb_env 354 } // namespace leveldb_env
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698