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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 5976005: show notification on locale change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: infobar -> SystemNotification Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
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..699000d6cf63750c535fcdc93bc3ae64c66d75fe 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.
@@ -23,6 +23,7 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/child_process_security_policy.h"
+#include "chrome/browser/chromeos/locale_change_guard.h"
#include "chrome/browser/content_settings/content_settings_details.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/debugger/devtools_manager.h"
@@ -834,6 +835,9 @@ void TabContents::DidBecomeSelected() {
WebCacheManager::GetInstance()->ObserveActivity(GetRenderProcessHost()->id());
last_selected_time_ = base::TimeTicks::Now();
+#if defined(OS_CHROMEOS)
+ chromeos::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
// 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/12 16:33:16 I guess I'd run i from 0 to child_windows_.size()
Denis Lagno 2011/01/12 20:27:34 I've changed the loop. However I fear to add comme
whywhat 2011/01/13 10:09:43 Yet, you don't fear to change the code itself like
ConstrainedWindow* window = child_windows_[i];
if (window) {
window->CloseConstrainedWindow();

Powered by Google App Engine
This is Rietveld 408576698