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

Side by Side Diff: extensions/browser/app_window/app_window_geometry_cache.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 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
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 "extensions/browser/app_window/app_window_geometry_cache.h" 5 #include "extensions/browser/app_window/app_window_geometry_cache.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 void AppWindowGeometryCache::OnExtensionLoaded( 190 void AppWindowGeometryCache::OnExtensionLoaded(
191 content::BrowserContext* browser_context, 191 content::BrowserContext* browser_context,
192 const Extension* extension) { 192 const Extension* extension) {
193 LoadGeometryFromStorage(extension->id()); 193 LoadGeometryFromStorage(extension->id());
194 } 194 }
195 195
196 void AppWindowGeometryCache::OnExtensionUnloaded( 196 void AppWindowGeometryCache::OnExtensionUnloaded(
197 content::BrowserContext* browser_context, 197 content::BrowserContext* browser_context,
198 const Extension* extension, 198 const Extension* extension,
199 UnloadedExtensionInfo::Reason reason) { 199 UnloadedExtensionReason reason) {
200 SyncToStorage(); 200 SyncToStorage();
201 cache_.erase(extension->id()); 201 cache_.erase(extension->id());
202 } 202 }
203 203
204 void AppWindowGeometryCache::SetSyncDelayForTests(int timeout_ms) { 204 void AppWindowGeometryCache::SetSyncDelayForTests(int timeout_ms) {
205 sync_delay_ = base::TimeDelta::FromMilliseconds(timeout_ms); 205 sync_delay_ = base::TimeDelta::FromMilliseconds(timeout_ms);
206 } 206 }
207 207
208 void AppWindowGeometryCache::LoadGeometryFromStorage( 208 void AppWindowGeometryCache::LoadGeometryFromStorage(
209 const std::string& extension_id) { 209 const std::string& extension_id) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 void AppWindowGeometryCache::AddObserver(Observer* observer) { 301 void AppWindowGeometryCache::AddObserver(Observer* observer) {
302 observers_.AddObserver(observer); 302 observers_.AddObserver(observer);
303 } 303 }
304 304
305 void AppWindowGeometryCache::RemoveObserver(Observer* observer) { 305 void AppWindowGeometryCache::RemoveObserver(Observer* observer) {
306 observers_.RemoveObserver(observer); 306 observers_.RemoveObserver(observer);
307 } 307 }
308 308
309 } // namespace extensions 309 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698