Commit 50d023db authored by mattm@chromium.org's avatar mattm@chromium.org

ClientSideDetectionService model fetch should honor kSbDisableAutoUpdate switch.

BUG=232851

Review URL: https://codereview.chromium.org/14225020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194728 0039d316-1c4b-4281-b951-d872f2087c98
parent 409d2fb7
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "base/time.h" #include "base/time.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/common/safe_browsing/client_model.pb.h" #include "chrome/common/safe_browsing/client_model.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h" #include "chrome/common/safe_browsing/csd.pb.h"
...@@ -270,6 +271,9 @@ void ClientSideDetectionService::SendModelToRenderers() { ...@@ -270,6 +271,9 @@ void ClientSideDetectionService::SendModelToRenderers() {
} }
void ClientSideDetectionService::ScheduleFetchModel(int64 delay_ms) { void ClientSideDetectionService::ScheduleFetchModel(int64 delay_ms) {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSbDisableAutoUpdate))
return;
MessageLoop::current()->PostDelayedTask( MessageLoop::current()->PostDelayedTask(
FROM_HERE, FROM_HERE,
base::Bind(&ClientSideDetectionService::StartFetchModel, base::Bind(&ClientSideDetectionService::StartFetchModel,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment