diff options
16 files changed, 17 insertions, 44 deletions
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store.h b/chrome/browser/extensions/api/content_settings/content_settings_store.h index 9cd21d36..cf2b071 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_store.h +++ b/chrome/browser/extensions/api/content_settings/content_settings_store.h @@ -18,7 +18,6 @@ #include "chrome/common/content_settings.h" #include "chrome/common/content_settings_pattern.h" #include "extensions/browser/extension_prefs_scope.h" -#include "url/gurl.h" namespace base { class ListValue; diff --git a/chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc b/chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc index bedd2ea..f3925f0c 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc @@ -9,6 +9,7 @@ #include "chrome/browser/content_settings/content_settings_utils.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "url/gurl.h" using ::testing::Mock; @@ -51,7 +52,7 @@ ContentSetting GetContentSettingFromStore( ContentSettingsType content_type, const std::string& resource_identifier, bool incognito) { - scoped_ptr<content_settings::RuleIterator> rule_iterator ( + scoped_ptr<content_settings::RuleIterator> rule_iterator( store->GetRuleIterator(content_type, resource_identifier, incognito)); scoped_ptr<base::Value> setting( content_settings::GetContentSettingValueAndPatterns( diff --git a/chrome/browser/extensions/api/declarative_content/content_condition.h b/chrome/browser/extensions/api/declarative_content/content_condition.h index c7a1db6..b189746 100644 --- a/chrome/browser/extensions/api/declarative_content/content_condition.h +++ b/chrome/browser/extensions/api/declarative_content/content_condition.h @@ -16,7 +16,6 @@ #include "base/values.h" #include "chrome/browser/extensions/api/declarative/declarative_rule.h" #include "components/url_matcher/url_matcher.h" -#include "url/gurl.h" namespace extensions { diff --git a/chrome/browser/extensions/api/declarative_content/content_condition_unittest.cc b/chrome/browser/extensions/api/declarative_content/content_condition_unittest.cc index fe0cdcb..9d6f24a 100644 --- a/chrome/browser/extensions/api/declarative_content/content_condition_unittest.cc +++ b/chrome/browser/extensions/api/declarative_content/content_condition_unittest.cc @@ -13,6 +13,7 @@ #include "components/url_matcher/url_matcher.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "url/gurl.h" using testing::ElementsAre; using testing::HasSubstr; diff --git a/chrome/browser/extensions/api/permissions/permissions_api.cc b/chrome/browser/extensions/api/permissions/permissions_api.cc index c26635d..4a3affb 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api.cc +++ b/chrome/browser/extensions/api/permissions/permissions_api.cc @@ -16,8 +16,6 @@ #include "extensions/common/permissions/permission_message_provider.h" #include "extensions/common/permissions/permissions_data.h" #include "extensions/common/permissions/permissions_info.h" -#include "extensions/common/url_pattern_set.h" -#include "url/gurl.h" namespace extensions { diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc index 8b5f911..4923d58 100644 --- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc +++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc @@ -32,7 +32,6 @@ #include "extensions/common/extension.h" #include "extensions/common/permissions/api_permission.h" #include "google_apis/gaia/gaia_constants.h" -#include "url/gurl.h" using content::BrowserThread; diff --git a/chrome/browser/extensions/api/tabs/tabs_constants.h b/chrome/browser/extensions/api/tabs/tabs_constants.h index 83b7d98..9c66f05 100644 --- a/chrome/browser/extensions/api/tabs/tabs_constants.h +++ b/chrome/browser/extensions/api/tabs/tabs_constants.h @@ -23,7 +23,9 @@ extern const char kFocusedKey[]; extern const char kFormatKey[]; extern const char kFromIndexKey[]; extern const char kHeightKey[]; +extern const char kHighlightedKey[]; extern const char kIdKey[]; +extern const char kIncognitoKey[]; extern const char kIndexKey[]; extern const char kLastFocusedWindowKey[]; extern const char kLeftKey[]; @@ -34,7 +36,6 @@ extern const char kOldWindowIdKey[]; extern const char kOpenerTabIdKey[]; extern const char kPinnedKey[]; extern const char kQualityKey[]; -extern const char kHighlightedKey[]; extern const char kRunAtKey[]; extern const char kSelectedKey[]; extern const char kShowStateKey[]; @@ -46,10 +47,9 @@ extern const char kTitleKey[]; extern const char kToIndexKey[]; extern const char kTopKey[]; extern const char kUrlKey[]; -extern const char kWindowClosing[]; extern const char kWidthKey[]; +extern const char kWindowClosing[]; extern const char kWindowIdKey[]; -extern const char kIncognitoKey[]; extern const char kWindowTypeKey[]; extern const char kWindowTypeLongKey[]; diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc index 246a56f..3bea9c3 100644 --- a/chrome/browser/extensions/extension_tab_util.cc +++ b/chrome/browser/extensions/extension_tab_util.cc @@ -52,8 +52,8 @@ WindowController* GetShellWindowController(const WebContents* contents) { registry->GetShellWindowForRenderViewHost(contents->GetRenderViewHost()); if (!shell_window) return NULL; - return WindowControllerList::GetInstance()-> - FindWindowById(shell_window->session_id().id()); + return WindowControllerList::GetInstance()->FindWindowById( + shell_window->session_id().id()); } } // namespace @@ -95,7 +95,7 @@ base::DictionaryValue* ExtensionTabUtil::CreateTabValue( (!extension || controller->IsVisibleToExtension(extension))) { return controller->CreateTabValue(extension, tab_index); } - base::DictionaryValue *result = + base::DictionaryValue* result = CreateTabValue(contents, tab_strip, tab_index); ScrubTabValueForExtension(contents, extension, result); return result; diff --git a/chrome/common/extensions/mime_types_handler.cc b/chrome/common/extensions/mime_types_handler.cc index 0fa2dcd..c63801b 100644 --- a/chrome/common/extensions/mime_types_handler.cc +++ b/chrome/common/extensions/mime_types_handler.cc @@ -5,18 +5,13 @@ #include "chrome/common/extensions/mime_types_handler.h" #include "base/logging.h" -#include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/extensions/extension_constants.h" -#include "content/public/common/url_constants.h" #include "extensions/common/error_utils.h" #include "extensions/common/manifest.h" #include "extensions/common/manifest_constants.h" -#include "extensions/common/url_pattern.h" -#include "url/gurl.h" -#include "url/url_util.h" namespace keys = extensions::manifest_keys; namespace errors = extensions::manifest_errors; diff --git a/chrome/common/extensions/mime_types_handler.h b/chrome/common/extensions/mime_types_handler.h index 240a12b..57788b6 100644 --- a/chrome/common/extensions/mime_types_handler.h +++ b/chrome/common/extensions/mime_types_handler.h @@ -12,11 +12,6 @@ #include "base/basictypes.h" #include "extensions/common/extension.h" #include "extensions/common/manifest_handler.h" -#include "extensions/common/url_pattern.h" -#include "extensions/common/url_pattern_set.h" -#include "url/gurl.h" - -class URLPattern; class MimeTypesHandler { public: diff --git a/chrome/renderer/extensions/media_galleries_custom_bindings.cc b/chrome/renderer/extensions/media_galleries_custom_bindings.cc index 57d63af5..139864d 100644 --- a/chrome/renderer/extensions/media_galleries_custom_bindings.cc +++ b/chrome/renderer/extensions/media_galleries_custom_bindings.cc @@ -19,20 +19,11 @@ namespace { // FileSystemObject GetMediaFileSystem(string file_system_url): construct // a file system object from a file system url. void GetMediaFileSystemObject(const v8::FunctionCallbackInfo<v8::Value>& args) { - if (args.Length() != 1) { - NOTREACHED(); - return; - } - if (!args[0]->IsString()) { - NOTREACHED(); - return; - } + CHECK_EQ(1, args.Length()); + CHECK(args[0]->IsString()); std::string fsid(*v8::String::Utf8Value(args[0])); - if (fsid.empty()) { - NOTREACHED(); - return; - } + CHECK(!fsid.empty()); blink::WebFrame* webframe = blink::WebFrame::frameForCurrentContext(); const GURL origin = GURL(webframe->document().securityOrigin().toString()); diff --git a/chrome/renderer/extensions/send_request_natives.cc b/chrome/renderer/extensions/send_request_natives.cc index ab5b202..49a7078 100644 --- a/chrome/renderer/extensions/send_request_natives.cc +++ b/chrome/renderer/extensions/send_request_natives.cc @@ -38,6 +38,7 @@ void SendRequestNatives::GetNextRequestId( // callback will be dispatched to EventBindings::HandleResponse. void SendRequestNatives::StartRequest( const v8::FunctionCallbackInfo<v8::Value>& args) { + CHECK_EQ(6, args.Length()); std::string name = *v8::String::Utf8Value(args[0]); int request_id = args[2]->Int32Value(); bool has_callback = args[3]->BooleanValue(); diff --git a/chrome/renderer/resources/extensions/app_window_custom_bindings.js b/chrome/renderer/resources/extensions/app_window_custom_bindings.js index f80970b..5276a15 100644 --- a/chrome/renderer/resources/extensions/app_window_custom_bindings.js +++ b/chrome/renderer/resources/extensions/app_window_custom_bindings.js @@ -10,7 +10,6 @@ var Binding = require('binding').Binding; var Event = require('event_bindings').Event; var forEach = require('utils').forEach; var renderViewObserverNatives = requireNative('renderViewObserverNatives'); -var sendRequest = require('sendRequest').sendRequest; var appWindowData = null; var currentAppWindow = null; diff --git a/chrome/renderer/resources/extensions/media_galleries_custom_bindings.js b/chrome/renderer/resources/extensions/media_galleries_custom_bindings.js index 2d9116d..8f4de45 100644 --- a/chrome/renderer/resources/extensions/media_galleries_custom_bindings.js +++ b/chrome/renderer/resources/extensions/media_galleries_custom_bindings.js @@ -5,9 +5,8 @@ // Custom binding for the Media Gallery API. var binding = require('binding').Binding.create('mediaGalleries'); - -var mediaGalleriesNatives = requireNative('mediaGalleries'); var blobNatives = requireNative('blob_natives'); +var mediaGalleriesNatives = requireNative('mediaGalleries'); var mediaGalleriesMetadata = {}; diff --git a/chrome/renderer/resources/extensions/permissions_custom_bindings.js b/chrome/renderer/resources/extensions/permissions_custom_bindings.js index 57b9953..f702dc0 100644 --- a/chrome/renderer/resources/extensions/permissions_custom_bindings.js +++ b/chrome/renderer/resources/extensions/permissions_custom_bindings.js @@ -7,7 +7,6 @@ var binding = require('binding').Binding.create('permissions'); var Event = require('event_bindings').Event; -var sendRequest = require('sendRequest').sendRequest; // These custom binding are only necessary because it is not currently // possible to have a union of types as the type of the items in an array. diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index a2e1e87..8c26aa3 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc @@ -869,7 +869,6 @@ void ExtensionPrefs::MigratePermissions(const ExtensionIdList& extension_ids) { PermissionsInfo* info = PermissionsInfo::GetInstance(); for (ExtensionIdList::const_iterator ext_id = extension_ids.begin(); ext_id != extension_ids.end(); ++ext_id) { - // An extension's granted permissions need to be migrated if the // full_access bit is present. This bit was always present in the previous // scheme and is never present now. @@ -887,15 +886,13 @@ void ExtensionPrefs::MigratePermissions(const ExtensionIdList& extension_ids) { const base::ListValue* apis = NULL; base::ListValue* new_apis = NULL; - std::string granted_apis = - JoinPrefs(kPrefGrantedPermissions, kPrefAPIs); + std::string granted_apis = JoinPrefs(kPrefGrantedPermissions, kPrefAPIs); if (ext->GetList(kPrefOldGrantedAPIs, &apis)) new_apis = apis->DeepCopy(); else new_apis = new base::ListValue(); - std::string plugin_name = info->GetByID( - APIPermission::kPlugin)->name(); + std::string plugin_name = info->GetByID(APIPermission::kPlugin)->name(); new_apis->Append(new base::StringValue(plugin_name)); UpdateExtensionPref(*ext_id, granted_apis, new_apis); } @@ -1671,7 +1668,7 @@ void ExtensionPrefs::SetGeometryCache( } const base::DictionaryValue* ExtensionPrefs::GetInstallSignature() { - return prefs_->GetDictionary(kInstallSignature); + return prefs_->GetDictionary(kInstallSignature); } void ExtensionPrefs::SetInstallSignature( |