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

Side by Side Diff: chrome/views/focus_manager.cc

Issue 28046: Use string for Histogram names since these are all ASCII anyway wide-characte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/renderer/user_script_slave.cc ('k') | net/base/connection_type_histograms.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" 10 #include "chrome/browser/renderer_host/render_widget_host_view_win.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 void FocusManager::InstallFocusSubclass(HWND window, View* view) { 223 void FocusManager::InstallFocusSubclass(HWND window, View* view) {
224 DCHECK(window); 224 DCHECK(window);
225 225
226 bool already_subclassed = 226 bool already_subclassed =
227 reinterpret_cast<bool>(GetProp(window, 227 reinterpret_cast<bool>(GetProp(window,
228 kFocusSubclassInstalled)); 228 kFocusSubclassInstalled));
229 if (already_subclassed && 229 if (already_subclassed &&
230 !win_util::IsSubclassed(window, &FocusWindowCallback)) { 230 !win_util::IsSubclassed(window, &FocusWindowCallback)) {
231 NOTREACHED() << "window sub-classed by someone other than the FocusManager"; 231 NOTREACHED() << "window sub-classed by someone other than the FocusManager";
232 // Track in UMA so we know if this case happens. 232 // Track in UMA so we know if this case happens.
233 UMA_HISTOGRAM_COUNTS(L"FocusManager.MultipleSubclass", 1); 233 UMA_HISTOGRAM_COUNTS("FocusManager.MultipleSubclass", 1);
234 } else { 234 } else {
235 win_util::Subclass(window, &FocusWindowCallback); 235 win_util::Subclass(window, &FocusWindowCallback);
236 SetProp(window, kFocusSubclassInstalled, reinterpret_cast<HANDLE>(true)); 236 SetProp(window, kFocusSubclassInstalled, reinterpret_cast<HANDLE>(true));
237 } 237 }
238 if (view) 238 if (view)
239 SetProp(window, kViewKey, view); 239 SetProp(window, kViewKey, view);
240 } 240 }
241 241
242 void FocusManager::UninstallFocusSubclass(HWND window) { 242 void FocusManager::UninstallFocusSubclass(HWND window) {
243 DCHECK(window); 243 DCHECK(window);
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 std::find(focus_change_listeners_.begin(), focus_change_listeners_.end(), 835 std::find(focus_change_listeners_.begin(), focus_change_listeners_.end(),
836 listener); 836 listener);
837 if (place == focus_change_listeners_.end()) { 837 if (place == focus_change_listeners_.end()) {
838 NOTREACHED() << "Removing a listener that isn't registered."; 838 NOTREACHED() << "Removing a listener that isn't registered.";
839 return; 839 return;
840 } 840 }
841 focus_change_listeners_.erase(place); 841 focus_change_listeners_.erase(place);
842 } 842 }
843 843
844 } // namespace views 844 } // namespace views
845
OLDNEW
« no previous file with comments | « chrome/renderer/user_script_slave.cc ('k') | net/base/connection_type_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698