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

Unified Diff: chrome/browser/ui/webui/history_ui.cc

Issue 15969014: History: Update managed user history page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser tests Created 7 years, 6 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/ui/webui/history_ui.cc
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index 428d55514740afb82be5df201eefc44aed4a7acd..0b9365184ddf9902dcc309551ff3334209375705 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -369,22 +369,11 @@ scoped_ptr<DictionaryValue> BrowsingHistoryHandler::HistoryEntry::ToValue(
#if defined(ENABLE_MANAGED_USERS)
DCHECK(managed_user_service);
if (managed_user_service->ProfileIsManaged()) {
- // URL exceptions take precedence over host exceptions.
- int manual_behavior = managed_user_service->GetManualBehaviorForURL(url);
- if (manual_behavior == ManagedUserService::MANUAL_NONE) {
- manual_behavior =
- managed_user_service->GetManualBehaviorForHost(url.host());
- }
- result->SetInteger("urlManualBehavior", manual_behavior);
- result->SetInteger("hostManualBehavior",
- managed_user_service->GetManualBehaviorForHost(url.host()));
- std::vector<ManagedModeSiteList::Site*> sites;
- managed_user_service->GetURLFilterForUIThread()->GetSites(url, &sites);
- result->SetBoolean("urlInContentPack", !sites.empty());
- sites.clear();
- managed_user_service->GetURLFilterForUIThread()->GetSites(
- url.GetWithEmptyPath(), &sites);
- result->SetBoolean("hostInContentPack", !sites.empty());
+ const ManagedModeURLFilter* url_filter =
+ managed_user_service->GetURLFilterForUIThread();
+ int filtering_behavior =
+ url_filter->GetFilteringBehaviorForURL(url.GetWithEmptyPath());
+ result->SetInteger("hostFilteringBehavior", filtering_behavior);
result->SetBoolean("blockedVisit", blocked_visit);
}

Powered by Google App Engine
This is Rietveld 408576698