summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm11
-rw-r--r--chrome/browser/ui/webui/options/content_settings_handler.cc12
2 files changed, 15 insertions, 8 deletions
diff --git a/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm b/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
index 65a14910..f7ce628 100644
--- a/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,8 +33,10 @@ class TableModelArrayControllerTest : public CocoaTest {
TestingProfile* profile = browser_helper_.profile();
HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
- ContentSettingsPattern example_com("[*.]example.com");
- ContentSettingsPattern moose_org("[*.]moose.org");
+ ContentSettingsPattern example_com =
+ ContentSettingsPattern::FromString("[*.]example.com");
+ ContentSettingsPattern moose_org =
+ ContentSettingsPattern::FromString("[*.]moose.org");
map->SetContentSetting(example_com,
CONTENT_SETTINGS_TYPE_PLUGINS,
"a-foo",
@@ -142,7 +144,8 @@ TEST_F(TableModelArrayControllerTest, RemoveAll) {
TEST_F(TableModelArrayControllerTest, AddException) {
TestingProfile* profile = browser_helper_.profile();
HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
- ContentSettingsPattern example_com("[*.]example.com");
+ ContentSettingsPattern example_com =
+ ContentSettingsPattern::FromString("[*.]example.com");
map->SetContentSetting(example_com,
CONTENT_SETTINGS_TYPE_PLUGINS,
"c-blurp",
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 7f76ed8..25263bb 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -4,6 +4,9 @@
#include "chrome/browser/ui/webui/options/content_settings_handler.h"
+#include <string>
+#include <vector>
+
#include "base/callback.h"
#include "base/command_line.h"
#include "base/utf_string_conversions.h"
@@ -126,7 +129,7 @@ DictionaryValue* GetExceptionForPage(
DictionaryValue* exception = new DictionaryValue();
exception->Set(
kDisplayPattern,
- new StringValue(pattern.AsString()));
+ new StringValue(pattern.ToString()));
exception->Set(
kSetting,
new StringValue(ContentSettingToString(setting)));
@@ -641,7 +644,7 @@ void ContentSettingsHandler::RemoveException(const ListValue* args) {
// got destroyed before we received this message.
if (settings_map) {
settings_map->SetContentSetting(
- ContentSettingsPattern(pattern),
+ ContentSettingsPattern::FromString(pattern),
ContentSettingsTypeFromGroupName(type_string),
"",
CONTENT_SETTING_DEFAULT);
@@ -676,7 +679,7 @@ void ContentSettingsHandler::SetException(const ListValue* args) {
if (!settings_map)
return;
- settings_map->SetContentSetting(ContentSettingsPattern(pattern),
+ settings_map->SetContentSetting(ContentSettingsPattern::FromString(pattern),
type,
"",
ContentSettingFromString(setting));
@@ -692,7 +695,8 @@ void ContentSettingsHandler::CheckExceptionPatternValidity(
std::string pattern_string;
CHECK(args->GetString(arg_i++, &pattern_string));
- ContentSettingsPattern pattern(pattern_string);
+ ContentSettingsPattern pattern = ContentSettingsPattern::FromString(
+ pattern_string);
scoped_ptr<Value> mode_value(Value::CreateStringValue(mode_string));
scoped_ptr<Value> pattern_value(Value::CreateStringValue(pattern_string));