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

Side by Side Diff: chrome/browser/profiles/profile_destroyer.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/profiles/profile_destroyer.h" 5 #include "chrome/browser/profiles/profile_destroyer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "base/trace_event/trace_event.h" 12 #include "base/trace_event/trace_event.h"
13 #include "build/build_config.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
15 16
16 namespace { 17 namespace {
17 18
18 #if defined(OS_ANDROID) 19 #if defined(OS_ANDROID)
19 // Set the render host waiting time to 5s on Android, that's the same 20 // Set the render host waiting time to 5s on Android, that's the same
20 // as an "Application Not Responding" timeout. 21 // as an "Application Not Responding" timeout.
21 const int64 kTimerDelaySeconds = 5; 22 const int64_t kTimerDelaySeconds = 5;
22 #else 23 #else
23 const int64 kTimerDelaySeconds = 1; 24 const int64_t kTimerDelaySeconds = 1;
24 #endif 25 #endif
25 26
26 } // namespace 27 } // namespace
27 28
28 ProfileDestroyer::DestroyerSet* ProfileDestroyer::pending_destroyers_ = NULL; 29 ProfileDestroyer::DestroyerSet* ProfileDestroyer::pending_destroyers_ = NULL;
29 30
30 // static 31 // static
31 void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) { 32 void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) {
32 TRACE_EVENT0("shutdown", "ProfileDestroyer::DestroyProfileWhenAppropriate"); 33 TRACE_EVENT0("shutdown", "ProfileDestroyer::DestroyProfileWhenAppropriate");
33 34
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 content::RenderProcessHost::AllHostsIterator()); 176 content::RenderProcessHost::AllHostsIterator());
176 !iter.IsAtEnd(); iter.Advance()) { 177 !iter.IsAtEnd(); iter.Advance()) {
177 content::RenderProcessHost* render_process_host = iter.GetCurrentValue(); 178 content::RenderProcessHost* render_process_host = iter.GetCurrentValue();
178 if (render_process_host && 179 if (render_process_host &&
179 render_process_host->GetBrowserContext() == profile) { 180 render_process_host->GetBrowserContext() == profile) {
180 hosts->insert(render_process_host); 181 hosts->insert(render_process_host);
181 } 182 }
182 } 183 }
183 return !hosts->empty(); 184 return !hosts->empty();
184 } 185 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_destroyer.h ('k') | chrome/browser/profiles/profile_destroyer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698