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

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

Issue 1909773002: Convert //extensions/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void AppWindowGeometryCache::SyncToStorage() { 99 void AppWindowGeometryCache::SyncToStorage() {
100 std::set<std::string> tosync; 100 std::set<std::string> tosync;
101 tosync.swap(unsynced_extensions_); 101 tosync.swap(unsynced_extensions_);
102 for (std::set<std::string>::const_iterator it = tosync.begin(), 102 for (std::set<std::string>::const_iterator it = tosync.begin(),
103 eit = tosync.end(); 103 eit = tosync.end();
104 it != eit; 104 it != eit;
105 ++it) { 105 ++it) {
106 const std::string& extension_id = *it; 106 const std::string& extension_id = *it;
107 const ExtensionData& extension_data = cache_[extension_id]; 107 const ExtensionData& extension_data = cache_[extension_id];
108 108
109 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue); 109 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
110 for (ExtensionData::const_iterator it = extension_data.begin(), 110 for (ExtensionData::const_iterator it = extension_data.begin(),
111 eit = extension_data.end(); 111 eit = extension_data.end();
112 it != eit; 112 it != eit;
113 ++it) { 113 ++it) {
114 base::DictionaryValue* value = new base::DictionaryValue; 114 base::DictionaryValue* value = new base::DictionaryValue;
115 const gfx::Rect& bounds = it->second.bounds; 115 const gfx::Rect& bounds = it->second.bounds;
116 const gfx::Rect& screen_bounds = it->second.screen_bounds; 116 const gfx::Rect& screen_bounds = it->second.screen_bounds;
117 DCHECK(!bounds.IsEmpty()); 117 DCHECK(!bounds.IsEmpty());
118 DCHECK(!screen_bounds.IsEmpty()); 118 DCHECK(!screen_bounds.IsEmpty());
119 DCHECK(it->second.window_state != ui::SHOW_STATE_DEFAULT); 119 DCHECK(it->second.window_state != ui::SHOW_STATE_DEFAULT);
(...skipping 180 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