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

Side by Side Diff: content/browser/service_worker/service_worker_database.cc

Issue 253103003: ServiceWorker: Initialize member variable in ctor of ServiceWorkerDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/browser/service_worker/service_worker_database.h" 5 #include "content/browser/service_worker/service_worker_database.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 ServiceWorkerDatabase::RegistrationData::~RegistrationData() { 149 ServiceWorkerDatabase::RegistrationData::~RegistrationData() {
150 } 150 }
151 151
152 ServiceWorkerDatabase::ServiceWorkerDatabase(const base::FilePath& path) 152 ServiceWorkerDatabase::ServiceWorkerDatabase(const base::FilePath& path)
153 : path_(path), 153 : path_(path),
154 next_avail_registration_id_(0), 154 next_avail_registration_id_(0),
155 next_avail_resource_id_(0), 155 next_avail_resource_id_(0),
156 next_avail_version_id_(0), 156 next_avail_version_id_(0),
157 is_disabled_(false), 157 is_disabled_(false),
158 was_corruption_detected_(false) { 158 was_corruption_detected_(false),
159 is_initialized_(false) {
159 } 160 }
160 161
161 ServiceWorkerDatabase::~ServiceWorkerDatabase() { 162 ServiceWorkerDatabase::~ServiceWorkerDatabase() {
162 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 163 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
163 db_.reset(); 164 db_.reset();
164 } 165 }
165 166
166 bool ServiceWorkerDatabase::GetNextAvailableIds( 167 bool ServiceWorkerDatabase::GetNextAvailableIds(
167 int64* next_avail_registration_id, 168 int64* next_avail_registration_id,
168 int64* next_avail_version_id, 169 int64* next_avail_version_id,
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // TODO(nhiroki): Add an UMA histogram. 527 // TODO(nhiroki): Add an UMA histogram.
527 DLOG(ERROR) << "Failed at: " << from_here.ToString() 528 DLOG(ERROR) << "Failed at: " << from_here.ToString()
528 << " with error: " << status.ToString(); 529 << " with error: " << status.ToString();
529 is_disabled_ = true; 530 is_disabled_ = true;
530 if (status.IsCorruption()) 531 if (status.IsCorruption())
531 was_corruption_detected_ = true; 532 was_corruption_detected_ = true;
532 db_.reset(); 533 db_.reset();
533 } 534 }
534 535
535 } // namespace content 536 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698