Code: bool KeyMap::Press(const scoped_refptr<WindowProxy>& window,
                   const ui::KeyboardCode key_code,
                   const wchar_t& key) {
  if (key_code == ui::VKEY_SHIFT) {
    shift_ = !shift_;
  } else if (key_code == ui::VKEY_CONTROL) {
    control_ = !control_;
  } else if (key_code == ui::VKEY_MENU) {  // ALT
    alt_ = !alt_;
  } else if (key_code == ui::VKEY_COMMAND) {
    command_ = !command_;
  }

  int modifiers = 0;
  if (shift_ || shifted_keys_.find(key) != shifted_keys_.end()) {
    modifiers = modifiers | ui::EF_SHIFT_DOWN;
  }
  if (control_) {
    modifiers = modifiers | ui::EF_CONTROL_DOWN;
  }
  if (alt_) {
     modifiers = modifiers | ui::EF_ALT_DOWN;
   }
   if (command_) {
    VLOG(1) << "Pressing command key on linux!!";
     modifiers = modifiers | ui::EF_COMMAND_DOWN;
   }
 
  window->SimulateOSKeyPress(key_code, modifiers);

  return true;
}

Vulnerability Type: DoS 
CWE ID: CWE-399
Summary: Google V8, as used in Google Chrome before 13.0.782.107, does not properly perform const lookups, which allows remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted web site.
Commit Message: In chromedriver, add /log url to get the contents of the chromedriver log
remotely. Also add a 'chrome.verbose' boolean startup option.
Remove usage of VLOG(1) in chromedriver. We do not need as complicated
logging as in Chrome.
BUG=85241
TEST=none

Review URL: http://codereview.chromium.org/7104085

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88591 0039d316-1c4b-4281-b951-d872f2087c98