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

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: RTL fix 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 931340c3dd2210ffbe63eee186359969eb2f5987..505e228c27bfc12808aabcdd19c82d310f6864dd 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);
}
« chrome/browser/resources/history/history.js ('K') | « chrome/browser/resources/history/history.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698