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

Side by Side Diff: chrome/browser/user_style_sheet_watcher.cc

Issue 6793020: Move FilePathWatcher to base/files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use ::operator<< Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/user_style_sheet_watcher.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/user_style_sheet_watcher.h" 5 #include "chrome/browser/user_style_sheet_watcher.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "content/common/notification_service.h" 9 #include "content/common/notification_service.h"
10 #include "content/common/notification_type.h" 10 #include "content/common/notification_type.h"
11 11
12 using ::base::files::FilePathWatcher;
13
12 namespace { 14 namespace {
13 15
14 // The subdirectory of the profile that contains the style sheet. 16 // The subdirectory of the profile that contains the style sheet.
15 const char kStyleSheetDir[] = "User StyleSheets"; 17 const char kStyleSheetDir[] = "User StyleSheets";
16 // The filename of the stylesheet. 18 // The filename of the stylesheet.
17 const char kUserStyleSheetFile[] = "Custom.css"; 19 const char kUserStyleSheetFile[] = "Custom.css";
18 20
19 } // namespace 21 } // namespace
20 22
21 // UserStyleSheetLoader is responsible for loading the user style sheet on the 23 // UserStyleSheetLoader is responsible for loading the user style sheet on the
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 GURL UserStyleSheetWatcher::user_style_sheet() const { 162 GURL UserStyleSheetWatcher::user_style_sheet() const {
161 return loader_->user_style_sheet(); 163 return loader_->user_style_sheet();
162 } 164 }
163 165
164 void UserStyleSheetWatcher::Observe(NotificationType type, 166 void UserStyleSheetWatcher::Observe(NotificationType type,
165 const NotificationSource& source, const NotificationDetails& details) { 167 const NotificationSource& source, const NotificationDetails& details) {
166 DCHECK(type == NotificationType::RENDER_VIEW_HOST_CREATED_FOR_TAB); 168 DCHECK(type == NotificationType::RENDER_VIEW_HOST_CREATED_FOR_TAB);
167 loader_->NotifyLoaded(); 169 loader_->NotifyLoaded();
168 registrar_.RemoveAll(); 170 registrar_.RemoveAll();
169 } 171 }
OLDNEW
« no previous file with comments | « chrome/browser/user_style_sheet_watcher.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698