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

Side by Side Diff: components/offline_pages/offline_page_metadata_store_sql.cc

Issue 2352853002: Disallow redundant Bind calls. (Closed)
Patch Set: static_assert message tweak Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/offline_pages/offline_page_metadata_store_sql.h" 5 #include "components/offline_pages/offline_page_metadata_store_sql.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } 571 }
572 572
573 void OfflinePageMetadataStoreSQL::OnResetDone(const ResetCallback& callback, 573 void OfflinePageMetadataStoreSQL::OnResetDone(const ResetCallback& callback,
574 StoreState state) { 574 StoreState state) {
575 OnOpenConnectionDone(state); 575 OnOpenConnectionDone(state);
576 callback.Run(state == StoreState::LOADED); 576 callback.Run(state == StoreState::LOADED);
577 } 577 }
578 578
579 bool OfflinePageMetadataStoreSQL::CheckDb(const base::Closure& callback) { 579 bool OfflinePageMetadataStoreSQL::CheckDb(const base::Closure& callback) {
580 if (!db_.get() || state_ != StoreState::LOADED) { 580 if (!db_.get() || state_ != StoreState::LOADED) {
581 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 581 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
582 base::Bind(callback));
583 return false; 582 return false;
584 } 583 }
585 return true; 584 return true;
586 } 585 }
587 586
588 } // namespace offline_pages 587 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/background/request_queue_store_sql.cc ('k') | components/sync/base/bind_to_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698