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

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

Issue 8919017: Split UserMetrics into API vs. implementation. Move API to content/public. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Version for commit (merged again). Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/auto_reset.h" 11 #include "base/auto_reset.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "chrome/browser/content_settings/content_settings_rule.h" 15 #include "chrome/browser/content_settings/content_settings_rule.h"
16 #include "chrome/browser/content_settings/content_settings_utils.h" 16 #include "chrome/browser/content_settings/content_settings_utils.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/prefs/scoped_user_pref_update.h" 18 #include "chrome/browser/prefs/scoped_user_pref_update.h"
19 #include "chrome/common/chrome_notification_types.h" 19 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/content_settings.h" 21 #include "chrome/common/content_settings.h"
22 #include "chrome/common/content_settings_pattern.h" 22 #include "chrome/common/content_settings_pattern.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "content/browser/user_metrics.h"
25 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
26 #include "content/public/browser/notification_details.h" 25 #include "content/public/browser/notification_details.h"
27 #include "content/public/browser/notification_source.h" 26 #include "content/public/browser/notification_source.h"
27 #include "content/public/browser/user_metrics.h"
28 #include "googleurl/src/gurl.h" 28 #include "googleurl/src/gurl.h"
29 29
30 using content::BrowserThread; 30 using content::BrowserThread;
31 using content::UserMetricsAction;
31 32
32 namespace { 33 namespace {
33 34
34 typedef std::pair<std::string, std::string> StringPair; 35 typedef std::pair<std::string, std::string> StringPair;
35 typedef std::map<std::string, std::string> StringMap; 36 typedef std::map<std::string, std::string> StringMap;
36 37
37 const char kPerPluginPrefName[] = "per_plugin"; 38 const char kPerPluginPrefName[] = "per_plugin";
38 39
39 ContentSetting FixObsoleteCookiePromptMode(ContentSettingsType content_type, 40 ContentSetting FixObsoleteCookiePromptMode(ContentSettingsType content_type,
40 ContentSetting setting) { 41 ContentSetting setting) {
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1109
1109 void PrefProvider::AssertLockNotHeld() const { 1110 void PrefProvider::AssertLockNotHeld() const {
1110 #if !defined(NDEBUG) 1111 #if !defined(NDEBUG)
1111 // |Lock::Acquire()| will assert if the lock is held by this thread. 1112 // |Lock::Acquire()| will assert if the lock is held by this thread.
1112 lock_.Acquire(); 1113 lock_.Acquire();
1113 lock_.Release(); 1114 lock_.Release();
1114 #endif 1115 #endif
1115 } 1116 }
1116 1117
1117 } // namespace content_settings 1118 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698