Index: chrome/browser/tab_contents/tab_contents.cc |
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc |
index 563279e72dd89e51a4664748d8cdefdec71d1c97..514e36351d20df4a3d4d3103a1d17345929504ed 100644 |
--- a/chrome/browser/tab_contents/tab_contents.cc |
+++ b/chrome/browser/tab_contents/tab_contents.cc |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
@@ -70,6 +70,7 @@ |
#include "chrome/browser/sessions/session_types.h" |
#include "chrome/browser/tab_contents/infobar_delegate.h" |
#include "chrome/browser/tab_contents/interstitial_page.h" |
+#include "chrome/browser/tab_contents/locale_change_guard.h" |
#include "chrome/browser/tab_contents/navigation_entry.h" |
#include "chrome/browser/tab_contents/provisional_load_details.h" |
#include "chrome/browser/tab_contents/tab_contents_delegate.h" |
@@ -834,6 +835,9 @@ void TabContents::DidBecomeSelected() { |
WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id()); |
last_selected_time_ = base::TimeTicks::Now(); |
+#if defined(OS_CHROMEOS) |
whywhat
2011/01/11 10:24:14
If we have ifdef here why do all this stuff with L
Denis Lagno
2011/01/12 15:33:28
my first impression was that this stuff is not ver
|
+ LocaleChangeGuard::Check(this); |
+#endif |
} |
void TabContents::FadeForInstant(bool animate) { |
@@ -1987,8 +1991,7 @@ void TabContents::CloseConstrainedWindows() { |
// Clear out any constrained windows since we are leaving this page entirely. |
// We use indices instead of iterators in case CloseWindow does something |
whywhat
2011/01/11 10:24:14
Don't see how this could happen unless a) there's
Denis Lagno
2011/01/12 15:33:28
Disclaimer: this is not my code so below is just a
|
// that may invalidate an iterator. |
- int size = static_cast<int>(child_windows_.size()); |
- for (int i = size - 1; i >= 0; --i) { |
+ for (size_t i = child_windows_.size(); i--;) { |
whywhat
2011/01/11 10:24:14
Why not do a loop from 0 to size() or, if it was a
Denis Lagno
2011/01/12 15:33:28
why loop in reverse order -- speculated above.
as
|
ConstrainedWindow* window = child_windows_[i]; |
if (window) { |
window->CloseConstrainedWindow(); |