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

Side by Side Diff: chrome/browser/extensions/extension_storage_monitor.cc

Issue 624153002: replace OVERRIDE and FINAL with override and final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 "chrome/browser/extensions/extension_storage_monitor.h" 5 #include "chrome/browser/extensions/extension_storage_monitor.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 StorageState() : next_threshold(0) {} 174 StorageState() : next_threshold(0) {}
175 }; 175 };
176 typedef std::map<GURL, StorageState> OriginStorageStateMap; 176 typedef std::map<GURL, StorageState> OriginStorageStateMap;
177 177
178 virtual ~StorageEventObserver() { 178 virtual ~StorageEventObserver() {
179 DCHECK(origin_state_map_.empty()); 179 DCHECK(origin_state_map_.empty());
180 StopObserving(); 180 StopObserving();
181 } 181 }
182 182
183 // storage::StorageObserver implementation. 183 // storage::StorageObserver implementation.
184 virtual void OnStorageEvent(const Event& event) OVERRIDE { 184 virtual void OnStorageEvent(const Event& event) override {
185 OriginStorageStateMap::iterator state = 185 OriginStorageStateMap::iterator state =
186 origin_state_map_.find(event.filter.origin); 186 origin_state_map_.find(event.filter.origin);
187 if (state == origin_state_map_.end()) 187 if (state == origin_state_map_.end())
188 return; 188 return;
189 189
190 if (event.usage >= state->second.next_threshold) { 190 if (event.usage >= state->second.next_threshold) {
191 while (event.usage >= state->second.next_threshold) 191 while (event.usage >= state->second.next_threshold)
192 state->second.next_threshold *= 2; 192 state->second.next_threshold *= 2;
193 193
194 BrowserThread::PostTask( 194 BrowserThread::PostTask(
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 void ExtensionStorageMonitor::SetStorageNotificationEnabled( 609 void ExtensionStorageMonitor::SetStorageNotificationEnabled(
610 const std::string& extension_id, 610 const std::string& extension_id,
611 bool enable_notifications) { 611 bool enable_notifications) {
612 extension_prefs_->UpdateExtensionPref( 612 extension_prefs_->UpdateExtensionPref(
613 extension_id, 613 extension_id,
614 kPrefDisableStorageNotifications, 614 kPrefDisableStorageNotifications,
615 enable_notifications ? NULL : new base::FundamentalValue(true)); 615 enable_notifications ? NULL : new base::FundamentalValue(true));
616 } 616 }
617 617
618 } // namespace extensions 618 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698