diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-13 00:13:00 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-13 00:13:00 +0000 |
commit | 1f82b3d181c2e5c87670645f1f298532ca813956 (patch) | |
tree | dad5003d8c7be671d472e56d80aeb20d9eeb97df | |
parent | 7f4ad940481637e20452bc763d83717c7aaa72d3 (diff) | |
download | chromium_src-1f82b3d181c2e5c87670645f1f298532ca813956.zip chromium_src-1f82b3d181c2e5c87670645f1f298532ca813956.tar.gz chromium_src-1f82b3d181c2e5c87670645f1f298532ca813956.tar.bz2 |
Don't attempt to forward declare StringPiece.
1) This is discouraged because it prevents callers from benefiting from automatic coersion from string/char* types.
2) A follow-up CL (http://codereview.chromium.org/8659047/) will make StringPiece a template, and thus awkward to forward declare. The very small number of places that were appropriately forward declaring it do not justify writing a 'string_piece_forward.h'.
BUG=87634
R=brettw@chromium.org
Review URL: http://codereview.chromium.org/8820016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114124 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/sys_string_conversions.h | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/user_script_master.h | 5 | ||||
-rw-r--r-- | chrome/common/jstemplate_builder.h | 5 | ||||
-rw-r--r-- | chrome/common/net/net_resource_provider.h | 6 | ||||
-rw-r--r-- | chrome/renderer/static_v8_external_string_resource.h | 4 | ||||
-rw-r--r-- | chrome/test/base/v8_unit_test.h | 5 | ||||
-rw-r--r-- | content/shell/shell.h | 5 |
7 files changed, 9 insertions, 24 deletions
diff --git a/base/sys_string_conversions.h b/base/sys_string_conversions.h index d2f4d1b..2be248d 100644 --- a/base/sys_string_conversions.h +++ b/base/sys_string_conversions.h @@ -15,6 +15,7 @@ #include "base/base_export.h" #include "base/basictypes.h" #include "base/string16.h" +#include "base/string_piece.h" #if defined(OS_MACOSX) #include <CoreFoundation/CoreFoundation.h> @@ -27,8 +28,6 @@ class NSString; namespace base { -class StringPiece; - // Converts between wide and UTF-8 representations of a string. On error, the // result is system-dependent. BASE_EXPORT std::string SysWideToUTF8(const std::wstring& wide); diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h index 2be6189..344b485 100644 --- a/chrome/browser/extensions/user_script_master.h +++ b/chrome/browser/extensions/user_script_master.h @@ -14,6 +14,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/shared_memory.h" +#include "base/string_piece.h" #include "chrome/browser/extensions/extension_info_map.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/extension_set.h" @@ -22,10 +23,6 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" -namespace base { -class StringPiece; -} - namespace content { class RenderProcessHost; } diff --git a/chrome/common/jstemplate_builder.h b/chrome/common/jstemplate_builder.h index ae4563b..c4f5de4 100644 --- a/chrome/common/jstemplate_builder.h +++ b/chrome/common/jstemplate_builder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,9 +16,10 @@ #include <string> +#include "base/string_piece.h" + namespace base { class DictionaryValue; -class StringPiece; } namespace jstemplate_builder { diff --git a/chrome/common/net/net_resource_provider.h b/chrome/common/net/net_resource_provider.h index c577075..cebb3df 100644 --- a/chrome/common/net/net_resource_provider.h +++ b/chrome/common/net/net_resource_provider.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,9 +6,7 @@ #define CHROME_COMMON_NET_NET_RESOURCE_PROVIDER_H_ #pragma once -namespace base { -class StringPiece; -} +#include "base/string_piece.h" namespace chrome_common_net { diff --git a/chrome/renderer/static_v8_external_string_resource.h b/chrome/renderer/static_v8_external_string_resource.h index 7a72b79..27a8cd2 100644 --- a/chrome/renderer/static_v8_external_string_resource.h +++ b/chrome/renderer/static_v8_external_string_resource.h @@ -10,10 +10,6 @@ #include "base/string_piece.h" #include "v8/include/v8.h" -namespace base { -class StringPiece; -} - // A very simple implementation of v8::ExternalAsciiStringResource that just // wraps a buffer. The buffer must outlive the v8 runtime instance this resource // is used in. diff --git a/chrome/test/base/v8_unit_test.h b/chrome/test/base/v8_unit_test.h index 9391dae..d61da81 100644 --- a/chrome/test/base/v8_unit_test.h +++ b/chrome/test/base/v8_unit_test.h @@ -10,13 +10,10 @@ #include <vector> #include "base/file_path.h" +#include "base/string_piece.h" #include "testing/gtest/include/gtest/gtest.h" #include "v8/include/v8.h" -namespace base { -class StringPiece; -} - // A superclass for unit tests that involve running JavaScript. This class // sets up V8 context and has methods that make it easy to execute scripts in // this context as well as call functions in the context. diff --git a/content/shell/shell.h b/content/shell/shell.h index 99d5748..af5128c 100644 --- a/content/shell/shell.h +++ b/content/shell/shell.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "base/string_piece.h" #include "content/browser/tab_contents/tab_contents_delegate.h" #include "ui/gfx/native_widget_types.h" @@ -18,10 +19,6 @@ class GURL; class SiteInstance; class TabContents; -namespace base { -class StringPiece; -} - namespace content { class BrowserContext; |