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

Side by Side Diff: chrome/browser/extensions/extension_service.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: Move to content namespace. Update usages. Update extract_actions tool. 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/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 #include "chrome/common/extensions/extension.h" 85 #include "chrome/common/extensions/extension.h"
86 #include "chrome/common/extensions/extension_constants.h" 86 #include "chrome/common/extensions/extension_constants.h"
87 #include "chrome/common/extensions/extension_error_utils.h" 87 #include "chrome/common/extensions/extension_error_utils.h"
88 #include "chrome/common/extensions/extension_file_util.h" 88 #include "chrome/common/extensions/extension_file_util.h"
89 #include "chrome/common/extensions/extension_messages.h" 89 #include "chrome/common/extensions/extension_messages.h"
90 #include "chrome/common/extensions/extension_resource.h" 90 #include "chrome/common/extensions/extension_resource.h"
91 #include "chrome/common/pref_names.h" 91 #include "chrome/common/pref_names.h"
92 #include "chrome/common/url_constants.h" 92 #include "chrome/common/url_constants.h"
93 #include "content/browser/plugin_process_host.h" 93 #include "content/browser/plugin_process_host.h"
94 #include "content/browser/plugin_service.h" 94 #include "content/browser/plugin_service.h"
95 #include "content/browser/user_metrics.h"
96 #include "content/public/browser/browser_thread.h" 95 #include "content/public/browser/browser_thread.h"
97 #include "content/public/browser/devtools_agent_host_registry.h" 96 #include "content/public/browser/devtools_agent_host_registry.h"
98 #include "content/public/browser/devtools_manager.h" 97 #include "content/public/browser/devtools_manager.h"
99 #include "content/public/browser/notification_service.h" 98 #include "content/public/browser/notification_service.h"
100 #include "content/public/browser/notification_types.h" 99 #include "content/public/browser/notification_types.h"
101 #include "content/public/browser/render_process_host.h" 100 #include "content/public/browser/render_process_host.h"
101 #include "content/public/browser/user_metrics.h"
102 #include "content/public/common/pepper_plugin_info.h" 102 #include "content/public/common/pepper_plugin_info.h"
103 #include "googleurl/src/gurl.h" 103 #include "googleurl/src/gurl.h"
104 #include "grit/theme_resources.h" 104 #include "grit/theme_resources.h"
105 #include "net/base/registry_controlled_domain.h" 105 #include "net/base/registry_controlled_domain.h"
106 #include "webkit/database/database_tracker.h" 106 #include "webkit/database/database_tracker.h"
107 #include "webkit/database/database_util.h" 107 #include "webkit/database/database_util.h"
108 108
109 #if defined(OS_CHROMEOS) 109 #if defined(OS_CHROMEOS)
110 #include "chrome/browser/chromeos/cros/cros_library.h" 110 #include "chrome/browser/chromeos/cros/cros_library.h"
111 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 111 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
112 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" 112 #include "chrome/browser/chromeos/extensions/input_method_event_router.h"
113 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" 113 #include "chrome/browser/chromeos/extensions/media_player_event_router.h"
114 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 114 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
115 #include "chrome/browser/extensions/extension_input_ime_api.h" 115 #include "chrome/browser/extensions/extension_input_ime_api.h"
116 #include "webkit/fileapi/file_system_context.h" 116 #include "webkit/fileapi/file_system_context.h"
117 #include "webkit/fileapi/file_system_mount_point_provider.h" 117 #include "webkit/fileapi/file_system_mount_point_provider.h"
118 #include "webkit/fileapi/file_system_path_manager.h" 118 #include "webkit/fileapi/file_system_path_manager.h"
119 #endif 119 #endif
120 120
121 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD) 121 #if defined(OS_CHROMEOS) && defined(USE_VIRTUAL_KEYBOARD)
122 #include "chrome/browser/extensions/extension_input_ui_api.h" 122 #include "chrome/browser/extensions/extension_input_ui_api.h"
123 #endif 123 #endif
124 124
125 using base::Time; 125 using base::Time;
126 using content::BrowserThread; 126 using content::BrowserThread;
127 using content::DevToolsAgentHost; 127 using content::DevToolsAgentHost;
128 using content::DevToolsAgentHostRegistry; 128 using content::DevToolsAgentHostRegistry;
129 using content::UserMetricsAction;
129 130
130 namespace errors = extension_manifest_errors; 131 namespace errors = extension_manifest_errors;
131 132
132 namespace { 133 namespace {
133 134
134 #if defined(OS_LINUX) 135 #if defined(OS_LINUX)
135 static const int kOmniboxIconPaddingLeft = 2; 136 static const int kOmniboxIconPaddingLeft = 2;
136 static const int kOmniboxIconPaddingRight = 2; 137 static const int kOmniboxIconPaddingRight = 2;
137 #elif defined(OS_MACOSX) 138 #elif defined(OS_MACOSX)
138 static const int kOmniboxIconPaddingLeft = 0; 139 static const int kOmniboxIconPaddingLeft = 0;
(...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2580 const ExtensionResource &resource, 2581 const ExtensionResource &resource,
2581 int index) { 2582 int index) {
2582 // If the image failed to load (e.g. if the resource being loaded was empty) 2583 // If the image failed to load (e.g. if the resource being loaded was empty)
2583 // use the standard application icon. 2584 // use the standard application icon.
2584 if (!image || image->isNull()) 2585 if (!image || image->isNull())
2585 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON); 2586 image = ExtensionIconSource::LoadImageByResourceId(IDR_APP_DEFAULT_ICON);
2586 2587
2587 shortcut_info_.favicon = *image; 2588 shortcut_info_.favicon = *image;
2588 web_app::CreateShortcut(profile_->GetPath(), shortcut_info_); 2589 web_app::CreateShortcut(profile_->GetPath(), shortcut_info_);
2589 } 2590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698