| 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/content_settings/content_settings_pref_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_pref_provider.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 using content::BrowserThread; | 35 using content::BrowserThread; |
| 36 | 36 |
| 37 namespace { | 37 namespace { |
| 38 | 38 |
| 39 void ExpectObsoleteGeolocationSetting( | 39 void ExpectObsoleteGeolocationSetting( |
| 40 const DictionaryValue& geo_settings_dictionary, | 40 const DictionaryValue& geo_settings_dictionary, |
| 41 const GURL& primary_origin, | 41 const GURL& primary_origin, |
| 42 const GURL& secondary_origin, | 42 const GURL& secondary_origin, |
| 43 ContentSetting expected_setting) { | 43 ContentSetting expected_setting) { |
| 44 | 44 |
| 45 DictionaryValue* one_origin_settings; | 45 const DictionaryValue* one_origin_settings; |
| 46 ASSERT_TRUE(geo_settings_dictionary.GetDictionaryWithoutPathExpansion( | 46 ASSERT_TRUE(geo_settings_dictionary.GetDictionaryWithoutPathExpansion( |
| 47 std::string(primary_origin.spec()), &one_origin_settings)); | 47 std::string(primary_origin.spec()), &one_origin_settings)); |
| 48 int setting_value; | 48 int setting_value; |
| 49 ASSERT_TRUE(one_origin_settings->GetIntegerWithoutPathExpansion( | 49 ASSERT_TRUE(one_origin_settings->GetIntegerWithoutPathExpansion( |
| 50 std::string(secondary_origin.spec()), &setting_value)); | 50 std::string(secondary_origin.spec()), &setting_value)); |
| 51 EXPECT_EQ(expected_setting, setting_value); | 51 EXPECT_EQ(expected_setting, setting_value); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 DictionaryValue* mutable_settings = update.Get(); | 590 DictionaryValue* mutable_settings = update.Get(); |
| 591 mutable_settings->SetWithoutPathExpansion("www.example.com,*", | 591 mutable_settings->SetWithoutPathExpansion("www.example.com,*", |
| 592 new base::DictionaryValue()); | 592 new base::DictionaryValue()); |
| 593 } | 593 } |
| 594 EXPECT_TRUE(observer.notification_received()); | 594 EXPECT_TRUE(observer.notification_received()); |
| 595 | 595 |
| 596 provider.ShutdownOnUIThread(); | 596 provider.ShutdownOnUIThread(); |
| 597 } | 597 } |
| 598 | 598 |
| 599 } // namespace content_settings | 599 } // namespace content_settings |
| OLD | NEW |