OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 ContentSettingsPattern::Relation r2 = | 247 ContentSettingsPattern::Relation r2 = |
248 info.secondary_pattern.Compare(secondary_pattern); | 248 info.secondary_pattern.Compare(secondary_pattern); |
249 DCHECK(r2 != ContentSettingsPattern::DISJOINT_ORDER_POST && | 249 DCHECK(r2 != ContentSettingsPattern::DISJOINT_ORDER_POST && |
250 r2 != ContentSettingsPattern::DISJOINT_ORDER_PRE); | 250 r2 != ContentSettingsPattern::DISJOINT_ORDER_PRE); |
251 if (r2 == ContentSettingsPattern::PREDECESSOR) | 251 if (r2 == ContentSettingsPattern::PREDECESSOR) |
252 secondary_pattern = info.secondary_pattern; | 252 secondary_pattern = info.secondary_pattern; |
253 } | 253 } |
254 | 254 |
255 base::Value* value = NULL; | 255 base::Value* value = NULL; |
256 if (setting != CONTENT_SETTING_DEFAULT) | 256 if (setting != CONTENT_SETTING_DEFAULT) |
257 value = base::Value::CreateIntegerValue(setting); | 257 value = new base::FundamentalValue(setting); |
258 content_settings_->SetWebsiteSetting( | 258 content_settings_->SetWebsiteSetting( |
259 primary_pattern, secondary_pattern, type, std::string(), value); | 259 primary_pattern, secondary_pattern, type, std::string(), value); |
260 } | 260 } |
261 | 261 |
262 show_info_bar_ = true; | 262 show_info_bar_ = true; |
263 | 263 |
264 // TODO(markusheintz): This is a temporary hack to fix issue: | 264 // TODO(markusheintz): This is a temporary hack to fix issue: |
265 // http://crbug.com/144203. | 265 // http://crbug.com/144203. |
266 #if defined(OS_MACOSX) | 266 #if defined(OS_MACOSX) |
267 // Refresh the UI to reflect the new setting. | 267 // Refresh the UI to reflect the new setting. |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 if (visited_before_today) { | 684 if (visited_before_today) { |
685 first_visit_text = l10n_util::GetStringFUTF16( | 685 first_visit_text = l10n_util::GetStringFUTF16( |
686 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, | 686 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, |
687 base::TimeFormatShortDate(first_visit)); | 687 base::TimeFormatShortDate(first_visit)); |
688 } else { | 688 } else { |
689 first_visit_text = l10n_util::GetStringUTF16( | 689 first_visit_text = l10n_util::GetStringUTF16( |
690 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); | 690 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); |
691 } | 691 } |
692 ui_->SetFirstVisit(first_visit_text); | 692 ui_->SetFirstVisit(first_visit_text); |
693 } | 693 } |
OLD | NEW |