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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 360059: Remove build time differences between Chrome Frame and Google Chrome in the... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_service.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_service.cc (revision 31093)
+++ chrome/browser/safe_browsing/safe_browsing_service.cc (working copy)
@@ -25,6 +25,9 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/common/url_constants.h"
+#if defined(OS_WIN)
+#include "chrome/installer/util/browser_distribution.h"
+#endif
#include "net/base/registry_controlled_domain.h"
using base::Time;
@@ -91,7 +94,23 @@
const std::string& wrapped_key) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
enabled_ = true;
+
+ // On Windows, get the safe browsing client name from the browser
+ // distribution classes in installer util. These classes don't yet have
+ // an analog on non-Windows builds so just keep the name specified here.
+#if defined(OS_WIN)
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ std::string client_name(dist->GetSafeBrowsingName());
+#else
+#if defined(GOOGLE_CHROME_BUILD)
+ std::string client_name("googlechrome");
+#else
+ std::string client_name("chromium");
+#endif
+#endif
+
protocol_manager_ = new SafeBrowsingProtocolManager(this,
+ client_name,
client_key,
wrapped_key);
// We want to initialize the protocol manager only after the database has
« no previous file with comments | « chrome/browser/safe_browsing/protocol_manager_unittest.cc ('k') | chrome/installer/util/browser_distribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698