Fix passing pointers between processes.

BUG=31880
Review URL: http://codereview.chromium.org/558036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37555 0039d316-1c4b-4281-b951-d872f2087c98
const char* NPN_UserAgent(NPP id) {
#if defined(OS_WIN)
  if (id) {
    scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
    if (plugin.get() && !plugin->use_mozilla_user_agent())
      return webkit_glue::GetUserAgent(GURL()).c_str();
  }

  return "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061103 Firefox/2.0a1";
#else
  return webkit_glue::GetUserAgent(GURL()).c_str();
#endif
}

const char* NPN_UserAgent(NPP id) {
#if defined(OS_WIN)
  if (id) {
    scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
    if (plugin.get() && !plugin->use_mozilla_user_agent())
      return webkit_glue::GetUserAgent(GURL()).c_str();
  }

  return "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061103 Firefox/2.0a1";
#else
  return webkit_glue::GetUserAgent(GURL()).c_str();
#endif
}
