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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/request_manager.cc

Issue 2172023002: chrome/browser/chromeos: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/chromeos/file_system_provider/request_manager.h" 5 #include "chrome/browser/chromeos/file_system_provider/request_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 const extensions::AppWindowRegistry* const registry = 219 const extensions::AppWindowRegistry* const registry =
220 extensions::AppWindowRegistry::Get(profile_); 220 extensions::AppWindowRegistry::Get(profile_);
221 DCHECK(registry); 221 DCHECK(registry);
222 if (registry->GetCurrentAppWindowForApp(extension_id_)) 222 if (registry->GetCurrentAppWindowForApp(extension_id_))
223 return true; 223 return true;
224 224
225 // This loop is heavy, but it's not called often. Only when a request timeouts 225 // This loop is heavy, but it's not called often. Only when a request timeouts
226 // which is at most once every 10 seconds per request (except tests). 226 // which is at most once every 10 seconds per request (except tests).
227 const extensions::WindowControllerList::ControllerList& windows = 227 const extensions::WindowControllerList::ControllerList& windows =
228 extensions::WindowControllerList::GetInstance()->windows(); 228 extensions::WindowControllerList::GetInstance()->windows();
229 for (const auto& window : windows) { 229 for (auto* window : windows) {
230 const Browser* const browser = window->GetBrowser(); 230 const Browser* const browser = window->GetBrowser();
231 if (!browser) 231 if (!browser)
232 continue; 232 continue;
233 const TabStripModel* const tabs = browser->tab_strip_model(); 233 const TabStripModel* const tabs = browser->tab_strip_model();
234 DCHECK(tabs); 234 DCHECK(tabs);
235 for (int i = 0; i < tabs->count(); ++i) { 235 for (int i = 0; i < tabs->count(); ++i) {
236 const content::WebContents* const web_contents = 236 const content::WebContents* const web_contents =
237 tabs->GetWebContentsAt(i); 237 tabs->GetWebContentsAt(i);
238 const GURL& url = web_contents->GetURL(); 238 const GURL& url = web_contents->GetURL();
239 if (url.SchemeIs(extensions::kExtensionScheme) && 239 if (url.SchemeIs(extensions::kExtensionScheme) &&
(...skipping 18 matching lines...) Expand all
258 notification_manager_->HideUnresponsiveNotification(request_id); 258 notification_manager_->HideUnresponsiveNotification(request_id);
259 259
260 FOR_EACH_OBSERVER(Observer, observers_, OnRequestDestroyed(request_id)); 260 FOR_EACH_OBSERVER(Observer, observers_, OnRequestDestroyed(request_id));
261 261
262 TRACE_EVENT_ASYNC_END0( 262 TRACE_EVENT_ASYNC_END0(
263 "file_system_provider", "RequestManager::Request", request_id); 263 "file_system_provider", "RequestManager::Request", request_id);
264 } 264 }
265 265
266 } // namespace file_system_provider 266 } // namespace file_system_provider
267 } // namespace chromeos 267 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698