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

Side by Side Diff: plugin/win/config.cc

Issue 149130: In preparation for becoming an internal plugin in chrome I did these things:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 5 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 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include <string> 50 #include <string>
51 #include <iostream> 51 #include <iostream>
52 #include <fstream> 52 #include <fstream>
53 53
54 #include "base/logging.h" 54 #include "base/logging.h"
55 #include "plugin/cross/config.h" 55 #include "plugin/cross/config.h"
56 #include "plugin/cross/plugin_metrics.h" 56 #include "plugin/cross/plugin_metrics.h"
57 #include "core/cross/install_check.h" 57 #include "core/cross/install_check.h"
58 #include "third_party/nixysa/files/static_glue/npapi/common.h" 58 #include "third_party/nixysa/files/static_glue/npapi/common.h"
59 59
60 namespace o3d {
61
60 // Check Windows version. 62 // Check Windows version.
61 bool CheckOSVersion(NPP npp) { 63 bool CheckOSVersion(NPP npp) {
62 OSVERSIONINFOEX version = {sizeof(OSVERSIONINFOEX)}; // NOLINT 64 OSVERSIONINFOEX version = {sizeof(OSVERSIONINFOEX)}; // NOLINT
63 GetVersionEx(reinterpret_cast<OSVERSIONINFO *>(&version)); 65 GetVersionEx(reinterpret_cast<OSVERSIONINFO *>(&version));
64 if (version.dwMajorVersion == 5 && version.dwMinorVersion == 1) { 66 if (version.dwMajorVersion == 5 && version.dwMinorVersion == 1) {
65 // NT 5.1 = Windows XP 67 // NT 5.1 = Windows XP
66 if (version.wServicePackMajor < 2) { 68 if (version.wServicePackMajor < 2) {
67 // TODO: internationalize messages. 69 // TODO: internationalize messages.
68 std::string error = std::string("Windows XP Service Pack 2 is required."); 70 std::string error = std::string("Windows XP Service Pack 2 is required.");
69 if (!AskUser(npp, error)) return false; 71 if (!AskUser(npp, error)) return false;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 o3d::metric_browser_type = o3d::BROWSER_NAME_OPERA; 227 o3d::metric_browser_type = o3d::BROWSER_NAME_OPERA;
226 } else if (std::string::npos != user_agent.find("Firefox")) { 228 } else if (std::string::npos != user_agent.find("Firefox")) {
227 o3d::metric_browser_type = o3d::BROWSER_NAME_FIREFOX; 229 o3d::metric_browser_type = o3d::BROWSER_NAME_FIREFOX;
228 } else if (std::string::npos != user_agent.find("MSIE")) { 230 } else if (std::string::npos != user_agent.find("MSIE")) {
229 o3d::metric_browser_type = o3d::BROWSER_NAME_MSIE; 231 o3d::metric_browser_type = o3d::BROWSER_NAME_MSIE;
230 } else { 232 } else {
231 o3d::metric_browser_type = o3d::BROWSER_NAME_UNKNOWN; 233 o3d::metric_browser_type = o3d::BROWSER_NAME_UNKNOWN;
232 } 234 }
233 return true; 235 return true;
234 } 236 }
237 } // namespace o3d
OLDNEW
« plugin/mac/main_mac.mm ('K') | « plugin/mac/plugin_mac.mm ('k') | plugin/win/main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698