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

Side by Side Diff: chrome/browser/notifications/message_center_settings_controller.cc

Issue 440423003: Clean content_settings_pattern_parser.* from unnecessary dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed the clients Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/notifications/message_center_settings_controller.h" 5 #include "chrome/browser/notifications/message_center_settings_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/string_compare.h" 10 #include "base/i18n/string_compare.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 favicon_tracker_.reset(new base::CancelableTaskTracker()); 250 favicon_tracker_.reset(new base::CancelableTaskTracker());
251 patterns_.clear(); 251 patterns_.clear();
252 for (ContentSettingsForOneType::const_iterator iter = settings.begin(); 252 for (ContentSettingsForOneType::const_iterator iter = settings.begin();
253 iter != settings.end(); ++iter) { 253 iter != settings.end(); ++iter) {
254 if (iter->primary_pattern == ContentSettingsPattern::Wildcard() && 254 if (iter->primary_pattern == ContentSettingsPattern::Wildcard() &&
255 iter->secondary_pattern == ContentSettingsPattern::Wildcard() && 255 iter->secondary_pattern == ContentSettingsPattern::Wildcard() &&
256 iter->source != "preference") { 256 iter->source != "preference") {
257 continue; 257 continue;
258 } 258 }
259 259
260 std::string url_pattern = iter->primary_pattern.ToString(); 260 std::string url_pattern =
261 iter->primary_pattern.ToString(extensions::kExtensionScheme);
261 base::string16 name = base::UTF8ToUTF16(url_pattern); 262 base::string16 name = base::UTF8ToUTF16(url_pattern);
262 GURL url(url_pattern); 263 GURL url(url_pattern);
263 NotifierId notifier_id(url); 264 NotifierId notifier_id(url);
264 notifiers->push_back(new Notifier( 265 notifiers->push_back(new Notifier(
265 notifier_id, 266 notifier_id,
266 name, 267 name,
267 notification_service->IsNotifierEnabled(notifier_id))); 268 notification_service->IsNotifierEnabled(notifier_id)));
268 patterns_[name] = iter->primary_pattern; 269 patterns_[name] = iter->primary_pattern;
269 // Note that favicon service obtains the favicon from history. This means 270 // Note that favicon service obtains the favicon from history. This means
270 // that it will fail to obtain the image if there are no history data for 271 // that it will fail to obtain the image if there are no history data for
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // another creating a primary profile, and causes an infinite loop. 518 // another creating a primary profile, and causes an infinite loop.
518 // Thus, it would be better to delay creating group for guest login. 519 // Thus, it would be better to delay creating group for guest login.
519 base::MessageLoopProxy::current()->PostTask( 520 base::MessageLoopProxy::current()->PostTask(
520 FROM_HERE, 521 FROM_HERE,
521 base::Bind( 522 base::Bind(
522 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin, 523 &MessageCenterSettingsController::CreateNotifierGroupForGuestLogin,
523 weak_factory_.GetWeakPtr())); 524 weak_factory_.GetWeakPtr()));
524 } 525 }
525 #endif 526 #endif
526 } 527 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698