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

Side by Side Diff: chrome/browser/hang_monitor/hung_plugin_action.cc

Issue 109673004: Revert "Update all users of base::Version to explicitly specify the namespace, and clean up the hea… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 <windows.h> 5 #include <windows.h>
6 6
7 #include "chrome/browser/hang_monitor/hung_plugin_action.h" 7 #include "chrome/browser/hang_monitor/hung_plugin_action.h"
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 22 matching lines...) Expand all
33 GTALK_PLUGIN_VERSION_34, 33 GTALK_PLUGIN_VERSION_34,
34 GTALK_PLUGIN_VERSION_MAX 34 GTALK_PLUGIN_VERSION_MAX
35 }; 35 };
36 36
37 // Converts the version string of Google Talk Plugin to a version enum. The 37 // Converts the version string of Google Talk Plugin to a version enum. The
38 // version format is "major(1 digit).minor(1 digit).sub(1 or 2 digits)", 38 // version format is "major(1 digit).minor(1 digit).sub(1 or 2 digits)",
39 // for example, "2.7.10" and "2.8.1". Converts the string to a number as 39 // for example, "2.7.10" and "2.8.1". Converts the string to a number as
40 // 10 * major + minor - kGTalkPluginLogMinVersion. 40 // 10 * major + minor - kGTalkPluginLogMinVersion.
41 GTalkPluginLogVersion GetGTalkPluginVersion(const base::string16& version) { 41 GTalkPluginLogVersion GetGTalkPluginVersion(const base::string16& version) {
42 int gtalk_plugin_version = GTALK_PLUGIN_VERSION_MIN; 42 int gtalk_plugin_version = GTALK_PLUGIN_VERSION_MIN;
43 base::Version plugin_version; 43 Version plugin_version;
44 content::WebPluginInfo::CreateVersionFromString(version, &plugin_version); 44 content::WebPluginInfo::CreateVersionFromString(version, &plugin_version);
45 if (plugin_version.IsValid() && plugin_version.components().size() >= 2) { 45 if (plugin_version.IsValid() && plugin_version.components().size() >= 2) {
46 gtalk_plugin_version = 10 * plugin_version.components()[0] + 46 gtalk_plugin_version = 10 * plugin_version.components()[0] +
47 plugin_version.components()[1] - kGTalkPluginLogMinVersion; 47 plugin_version.components()[1] - kGTalkPluginLogMinVersion;
48 } 48 }
49 49
50 if (gtalk_plugin_version < GTALK_PLUGIN_VERSION_MIN) 50 if (gtalk_plugin_version < GTALK_PLUGIN_VERSION_MIN)
51 return GTALK_PLUGIN_VERSION_MIN; 51 return GTALK_PLUGIN_VERSION_MIN;
52 if (gtalk_plugin_version > GTALK_PLUGIN_VERSION_MAX) 52 if (gtalk_plugin_version > GTALK_PLUGIN_VERSION_MAX)
53 return GTALK_PLUGIN_VERSION_MAX; 53 return GTALK_PLUGIN_VERSION_MAX;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void CALLBACK HungPluginAction::HungWindowResponseCallback(HWND target_window, 203 void CALLBACK HungPluginAction::HungWindowResponseCallback(HWND target_window,
204 UINT message, 204 UINT message,
205 ULONG_PTR data, 205 ULONG_PTR data,
206 LRESULT result) { 206 LRESULT result) {
207 HungPluginAction* instance = reinterpret_cast<HungPluginAction*>(data); 207 HungPluginAction* instance = reinterpret_cast<HungPluginAction*>(data);
208 DCHECK(NULL != instance); 208 DCHECK(NULL != instance);
209 if (NULL != instance) { 209 if (NULL != instance) {
210 instance->OnWindowResponsive(target_window); 210 instance->OnWindowResponsive(target_window);
211 } 211 }
212 } 212 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/upgrade_util_win.cc ('k') | chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698