diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-06 07:48:15 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-06 07:48:15 +0000 |
commit | 13169abc0aaffd173439844c9457c2e2eb96ccb2 (patch) | |
tree | 7747d2a9c8f8f5a1cc69de475ee91c7cd1625cd4 /chrome/browser/user_style_sheet_watcher.cc | |
parent | 1cbbad5bac0e5e5e097b417152ecedaa206e8371 (diff) | |
download | chromium_src-13169abc0aaffd173439844c9457c2e2eb96ccb2.zip chromium_src-13169abc0aaffd173439844c9457c2e2eb96ccb2.tar.gz chromium_src-13169abc0aaffd173439844c9457c2e2eb96ccb2.tar.bz2 |
Convert UserStyleSheetWatcher to a ProfileKeyedService.
BUG=121004
TEST=no new ones, passes existing
Review URL: http://codereview.chromium.org/9969037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131110 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/user_style_sheet_watcher.cc')
-rw-r--r-- | chrome/browser/user_style_sheet_watcher.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/user_style_sheet_watcher.cc b/chrome/browser/user_style_sheet_watcher.cc index 09093e6..4f909c1 100644 --- a/chrome/browser/user_style_sheet_watcher.cc +++ b/chrome/browser/user_style_sheet_watcher.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -133,7 +133,8 @@ void UserStyleSheetLoader::SetStyleSheet(const GURL& url) { UserStyleSheetWatcher::UserStyleSheetWatcher(Profile* profile, const FilePath& profile_path) - : profile_(profile), + : RefcountedProfileKeyedService(content::BrowserThread::UI), + profile_(profile), profile_path_(profile_path), loader_(new UserStyleSheetLoader) { // Listen for when the first render view host is created. If we load @@ -182,3 +183,7 @@ void UserStyleSheetWatcher::Observe(int type, registrar_.RemoveAll(); } } + +void UserStyleSheetWatcher::ShutdownOnUIThread() { + registrar_.RemoveAll(); +} |