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

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

Issue 10827429: Turn on warnings as errors for (most) third_party code on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lzma_sdk Created 8 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 | « skia/skia.gyp ('k') | third_party/lzma_sdk/CpuArch.h » ('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) 2011 The LevelDB Authors. All rights reserved. 1 // Copyright (c) 2011 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 <deque> 5 #include <deque>
6 #include <errno.h> 6 #include <errno.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 class ChromiumFileLock : public FileLock { 246 class ChromiumFileLock : public FileLock {
247 public: 247 public:
248 ::base::PlatformFile file_; 248 ::base::PlatformFile file_;
249 }; 249 };
250 250
251 class ChromiumEnv : public Env { 251 class ChromiumEnv : public Env {
252 public: 252 public:
253 ChromiumEnv(); 253 ChromiumEnv();
254 virtual ~ChromiumEnv() { 254 virtual ~ChromiumEnv() {
255 fprintf(stderr, "Destroying Env::Default()\n"); 255 NOTREACHED();
256 exit(1);
257 } 256 }
258 257
259 virtual Status NewSequentialFile(const std::string& fname, 258 virtual Status NewSequentialFile(const std::string& fname,
260 SequentialFile** result) { 259 SequentialFile** result) {
261 FILE* f = fopen_internal(fname.c_str(), "rb"); 260 FILE* f = fopen_internal(fname.c_str(), "rb");
262 if (f == NULL) { 261 if (f == NULL) {
263 *result = NULL; 262 *result = NULL;
264 return Status::IOError(fname, strerror(errno)); 263 return Status::IOError(fname, strerror(errno));
265 } else { 264 } else {
266 *result = new ChromiumSequentialFile(fname, f); 265 *result = new ChromiumSequentialFile(fname, f);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 ::base::LazyInstance<ChromiumEnv>::Leaky 546 ::base::LazyInstance<ChromiumEnv>::Leaky
548 default_env = LAZY_INSTANCE_INITIALIZER; 547 default_env = LAZY_INSTANCE_INITIALIZER;
549 548
550 } 549 }
551 550
552 Env* Env::Default() { 551 Env* Env::Default() {
553 return default_env.Pointer(); 552 return default_env.Pointer();
554 } 553 }
555 554
556 } 555 }
OLDNEW
« no previous file with comments | « skia/skia.gyp ('k') | third_party/lzma_sdk/CpuArch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698