leveldb: Add leveldb_chrome::NewMemEnv.

Calling leveldb_chrome::NewMemEnv() is identical to calling leveldb::NewMemEnv.
This change is being made to facilitate these future changes:

1) Conversion of leveldatabase to a component, (issue 764810).
2) Minimize caching for in-memory DBs, (issue 761398).
3) Reporting memory Env use to memory-infra, (issue 750803).

This change is a subset of http://crrev.com/c/647329 (reverted) without the
changes related to (2) above.

[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]

TBRing reviewers:
[email protected]:
  chrome/browser/extensions/api/sync_file_system/*
  chrome/browser/sync_file_system/*
  content/browser/service_worker/service_worker_database.cc
[email protected]:
  components/data_reduction_proxy/core/browser/data_store_impl.cc
[email protected]:
  components/leveldb_proto/*
[email protected]:
  components/sync/model_impl/model_type_store_backend.cc
[email protected]:
  content/browser/notifications/*
[email protected]:
  storage/browser/fileapi/quota/quota_backend_impl_unittest.cc
[email protected]:
  PRESUBMIT.py

Bug: 764810
Change-Id: I1fe456e5a1f8f02390648d578faf2be20148ead2
Reviewed-on: https://chromium-review.googlesource.com/703930
Commit-Queue: Chris Mumford <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Cr-Commit-Position: refs/heads/master@{#507406}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index f8af75701..2708859 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -383,6 +383,17 @@
       ),
     ),
     (
+      'leveldb::NewMemEnv',
+      (
+        'Instead of leveldb::NewMemEnv() use leveldb_chrome::NewMemEnv() from',
+        'third_party/leveldatabase/leveldb_chrome.h.',
+      ),
+      True,
+      (
+        r'^third_party/leveldatabase/.*\.(cc|h)$',
+      ),
+    ),
+    (
       'MessageLoop::QuitWhenIdleClosure',
       (
         'MessageLoop::QuitWhenIdleClosure is deprecated. Please migrate to',