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

Side by Side Diff: chrome/browser/protector/settings_change_global_error.cc

Issue 9597005: Revert 124890 - Convert uses of int ms to TimeDelta in chrome/browser and net. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/plugin_prefs.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/protector/settings_change_global_error.h" 5 #include "chrome/browser/protector/settings_change_global_error.h"
6 6
7 #include <bitset> 7 #include <bitset>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // This will delete |this|. 162 // This will delete |this|.
163 delegate_->OnRemovedFromProfile(this); 163 delegate_->OnRemovedFromProfile(this);
164 } 164 }
165 165
166 void SettingsChangeGlobalError::OnBubbleViewDidClose(Browser* browser) { 166 void SettingsChangeGlobalError::OnBubbleViewDidClose(Browser* browser) {
167 if (!closed_by_button_) { 167 if (!closed_by_button_) {
168 BrowserThread::PostDelayedTask( 168 BrowserThread::PostDelayedTask(
169 BrowserThread::UI, FROM_HERE, 169 BrowserThread::UI, FROM_HERE,
170 base::Bind(&SettingsChangeGlobalError::OnInactiveTimeout, 170 base::Bind(&SettingsChangeGlobalError::OnInactiveTimeout,
171 weak_factory_.GetWeakPtr()), 171 weak_factory_.GetWeakPtr()),
172 base::TimeDelta::FromMilliseconds(kMenuItemDisplayPeriodMs)); 172 kMenuItemDisplayPeriodMs);
173 #if !defined(TOOLKIT_GTK) 173 #if !defined(TOOLKIT_GTK)
174 // TODO(ivankr): the logic for redisplaying bubble is disabled on Gtk, see 174 // TODO(ivankr): the logic for redisplaying bubble is disabled on Gtk, see
175 // http://crbug.com/115719. 175 // http://crbug.com/115719.
176 if (browser->window() && 176 if (browser->window() &&
177 !platform_util::IsWindowActive(browser->window()->GetNativeHandle())) { 177 !platform_util::IsWindowActive(browser->window()->GetNativeHandle())) {
178 // Bubble closed because the entire window lost activation, display 178 // Bubble closed because the entire window lost activation, display
179 // again when a window gets active. 179 // again when a window gets active.
180 show_on_browser_activation_ = true; 180 show_on_browser_activation_ = true;
181 } 181 }
182 #endif 182 #endif
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 weak_factory_.InvalidateWeakPtrs(); 223 weak_factory_.InvalidateWeakPtrs();
224 ShowBubbleView(browser); 224 ShowBubbleView(browser);
225 } 225 }
226 226
227 void SettingsChangeGlobalError::OnInactiveTimeout() { 227 void SettingsChangeGlobalError::OnInactiveTimeout() {
228 delegate_->OnDecisionTimeout(this); 228 delegate_->OnDecisionTimeout(this);
229 RemoveFromProfile(); 229 RemoveFromProfile();
230 } 230 }
231 231
232 } // namespace protector 232 } // namespace protector
OLDNEW
« no previous file with comments | « chrome/browser/plugin_prefs.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698