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

Unified Diff: chrome/browser/policy/config_dir_policy_loader.cc

Issue 10827216: Don't run BrowserPolicyConnector::Init from TestingBrowserProcess by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 4 months 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/policy/config_dir_policy_loader.cc
diff --git a/chrome/browser/policy/config_dir_policy_loader.cc b/chrome/browser/policy/config_dir_policy_loader.cc
index 82495a4bebf5d679a0ee08cd24c8c0069c1e75ee..4e83229db6a7d75f1f607b28ced1576e4542f052 100644
--- a/chrome/browser/policy/config_dir_policy_loader.cc
+++ b/chrome/browser/policy/config_dir_policy_loader.cc
@@ -13,11 +13,9 @@
#include "base/file_util.h"
#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
-#include "base/message_loop.h"
#include "base/platform_file.h"
#include "base/stl_util.h"
#include "chrome/browser/policy/policy_bundle.h"
-#include "content/public/browser/browser_thread.h"
namespace policy {
@@ -38,13 +36,6 @@ ConfigDirPolicyLoader::ConfigDirPolicyLoader(const FilePath& config_dir,
ConfigDirPolicyLoader::~ConfigDirPolicyLoader() {}
void ConfigDirPolicyLoader::InitOnFile() {
- DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- // Some unit tests create a File thread that shares a MessageLoop with the
- // UI thread, and this causes DCHECKs because IO operations aren't allowed on
- // that thread. So if this is running in the context of one of those tests,
- // just exit.
- if (!MessageLoop::current()->IsType(MessageLoop::TYPE_IO))
- return;
base::files::FilePathWatcher::Callback callback =
base::Bind(&ConfigDirPolicyLoader::OnFileUpdated, base::Unretained(this));
mandatory_watcher_.Watch(config_dir_.Append(kMandatoryConfigDir), callback);
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/user_cloud_policy_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698