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

Side by Side Diff: chrome/browser/content_settings/content_settings_pref_provider_unittest.cc

Issue 10977073: Delete some unused code found by -Wunused-function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leiz Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 16 matching lines...) Expand all
27 #include "chrome/test/base/testing_pref_service.h" 27 #include "chrome/test/base/testing_pref_service.h"
28 #include "chrome/test/base/testing_profile.h" 28 #include "chrome/test/base/testing_profile.h"
29 #include "content/public/browser/notification_observer.h" 29 #include "content/public/browser/notification_observer.h"
30 #include "content/public/test/test_browser_thread.h" 30 #include "content/public/test/test_browser_thread.h"
31 #include "googleurl/src/gurl.h" 31 #include "googleurl/src/gurl.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 33
34 using ::testing::_; 34 using ::testing::_;
35 using content::BrowserThread; 35 using content::BrowserThread;
36 36
37 namespace {
38
39 void ExpectObsoleteGeolocationSetting(
40 const DictionaryValue& geo_settings_dictionary,
41 const GURL& primary_origin,
42 const GURL& secondary_origin,
43 ContentSetting expected_setting) {
44
45 const DictionaryValue* one_origin_settings;
46 ASSERT_TRUE(geo_settings_dictionary.GetDictionaryWithoutPathExpansion(
47 std::string(primary_origin.spec()), &one_origin_settings));
48 int setting_value;
49 ASSERT_TRUE(one_origin_settings->GetIntegerWithoutPathExpansion(
50 std::string(secondary_origin.spec()), &setting_value));
51 EXPECT_EQ(expected_setting, setting_value);
52 }
53
54 } // namespace
55
56 namespace content_settings { 37 namespace content_settings {
57 38
58 class DeadlockCheckerThread : public base::PlatformThread::Delegate { 39 class DeadlockCheckerThread : public base::PlatformThread::Delegate {
59 public: 40 public:
60 explicit DeadlockCheckerThread(PrefProvider* provider) 41 explicit DeadlockCheckerThread(PrefProvider* provider)
61 : provider_(provider) {} 42 : provider_(provider) {}
62 43
63 virtual void ThreadMain() { 44 virtual void ThreadMain() {
64 bool got_lock = provider_->lock_.Try(); 45 bool got_lock = provider_->lock_.Try();
65 EXPECT_TRUE(got_lock); 46 EXPECT_TRUE(got_lock);
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 DictionaryValue* mutable_settings = update.Get(); 571 DictionaryValue* mutable_settings = update.Get();
591 mutable_settings->SetWithoutPathExpansion("www.example.com,*", 572 mutable_settings->SetWithoutPathExpansion("www.example.com,*",
592 new base::DictionaryValue()); 573 new base::DictionaryValue());
593 } 574 }
594 EXPECT_TRUE(observer.notification_received()); 575 EXPECT_TRUE(observer.notification_received());
595 576
596 provider.ShutdownOnUIThread(); 577 provider.ShutdownOnUIThread();
597 } 578 }
598 579
599 } // namespace content_settings 580 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/pepper_flash_component_installer.cc ('k') | chrome/browser/download/save_page_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698