| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/value_store/value_store_frontend.h" | 5 #include "extensions/browser/value_store/value_store_frontend.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
| 12 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
| 13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 14 #include "extensions/browser/value_store/leveldb_value_store.h" | 15 #include "extensions/browser/value_store/leveldb_value_store.h" |
| 15 | 16 |
| 16 using content::BrowserThread; | 17 using content::BrowserThread; |
| 17 | 18 |
| 18 class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> { | 19 class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> { |
| 19 public: | 20 public: |
| 20 Backend() : storage_(NULL) {} | 21 Backend() : storage_(NULL) {} |
| 21 | 22 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 backend_, key, base::Passed(&value))); | 143 backend_, key, base::Passed(&value))); |
| 143 } | 144 } |
| 144 | 145 |
| 145 void ValueStoreFrontend::Remove(const std::string& key) { | 146 void ValueStoreFrontend::Remove(const std::string& key) { |
| 146 DCHECK(CalledOnValidThread()); | 147 DCHECK(CalledOnValidThread()); |
| 147 | 148 |
| 148 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 149 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 149 base::Bind(&ValueStoreFrontend::Backend::Remove, | 150 base::Bind(&ValueStoreFrontend::Backend::Remove, |
| 150 backend_, key)); | 151 backend_, key)); |
| 151 } | 152 } |
| OLD | NEW |