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

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

Issue 326001: Adding support for windows safari. This requires registering the o3d plugin w... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 1 month 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 | « plugin/cross/config_common.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } else if (version.dwMajorVersion > 5 || 73 } else if (version.dwMajorVersion > 5 ||
74 (version.dwMajorVersion == 5 && version.dwMinorVersion >= 2)) { 74 (version.dwMajorVersion == 5 && version.dwMinorVersion >= 2)) {
75 // 6.0 is Vista or Server 2008; it's now worth a try. 75 // 6.0 is Vista or Server 2008; it's now worth a try.
76 } else { 76 } else {
77 std::string error = std::string("Unsupported Windows version."); 77 std::string error = std::string("Unsupported Windows version.");
78 if (!AskUser(npp, error)) return false; 78 if (!AskUser(npp, error)) return false;
79 } 79 }
80 return true; 80 return true;
81 } 81 }
82 82
83 // Checks user agent string. We only allow Firefox, Chrome, and IE. 83 // Checks user agent string. We only allow Firefox, Chrome, Safari and IE.
84 bool CheckUserAgent(NPP npp, const std::string &user_agent) { 84 bool CheckUserAgent(NPP npp, const std::string &user_agent) {
85 if (user_agent.find("Firefox") == user_agent.npos && 85 if (user_agent.find("Firefox") == user_agent.npos &&
86 user_agent.find("Chrome") == user_agent.npos && 86 user_agent.find("Chrome") == user_agent.npos &&
87 user_agent.find("MSIE") == user_agent.npos) { 87 user_agent.find("MSIE") == user_agent.npos &&
88 user_agent.find("Safari") == user_agent.npos) {
88 std::string error = std::string("Unsupported user agent: ") + user_agent; 89 std::string error = std::string("Unsupported user agent: ") + user_agent;
89 return AskUser(npp, error); 90 return AskUser(npp, error);
90 } 91 }
91 return true; 92 return true;
92 } 93 }
93 94
94 bool OpenDriverBlacklistFile(std::ifstream *input_file) { 95 bool OpenDriverBlacklistFile(std::ifstream *input_file) {
95 CHECK(input_file); 96 CHECK(input_file);
96 CHECK(!input_file->is_open()); 97 CHECK(!input_file->is_open());
97 98
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } else if (std::string::npos != user_agent.find("Firefox")) { 229 } else if (std::string::npos != user_agent.find("Firefox")) {
229 o3d::metric_browser_type = o3d::BROWSER_NAME_FIREFOX; 230 o3d::metric_browser_type = o3d::BROWSER_NAME_FIREFOX;
230 } else if (std::string::npos != user_agent.find("MSIE")) { 231 } else if (std::string::npos != user_agent.find("MSIE")) {
231 o3d::metric_browser_type = o3d::BROWSER_NAME_MSIE; 232 o3d::metric_browser_type = o3d::BROWSER_NAME_MSIE;
232 } else { 233 } else {
233 o3d::metric_browser_type = o3d::BROWSER_NAME_UNKNOWN; 234 o3d::metric_browser_type = o3d::BROWSER_NAME_UNKNOWN;
234 } 235 }
235 return true; 236 return true;
236 } 237 }
237 } // namespace o3d 238 } // namespace o3d
OLDNEW
« no previous file with comments | « plugin/cross/config_common.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698