summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-01 02:17:08 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-01 02:17:08 +0000
commitf214f8797150f49e1233110c1dafe4e8b601d9ea (patch)
tree191f4f5b9ee1d9c20fc02dd4f1c940ad4d04267c /chrome_frame
parent34b9963c187a733bef76535521f3de688fffd34f (diff)
downloadchromium_src-f214f8797150f49e1233110c1dafe4e8b601d9ea.zip
chromium_src-f214f8797150f49e1233110c1dafe4e8b601d9ea.tar.gz
chromium_src-f214f8797150f49e1233110c1dafe4e8b601d9ea.tar.bz2
Remove base/platform_thread.h stub and fix up all callers to use the new location and namespace.
TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/metrics_service.cc20
-rw-r--r--chrome_frame/metrics_service.h4
-rw-r--r--chrome_frame/npapi_url_request.cc9
-rw-r--r--chrome_frame/npapi_url_request.h1
-rw-r--r--chrome_frame/ns_isupports_impl.h12
-rw-r--r--chrome_frame/test/perf/run_all.cc4
6 files changed, 25 insertions, 25 deletions
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index 7b9570b..3311853 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -251,12 +251,12 @@ class ChromeFrameMetricsDataUploader
ChromeFrameMetricsDataUploader()
: fetcher_(NULL) {
DVLOG(1) << __FUNCTION__;
- creator_thread_id_ = PlatformThread::CurrentId();
+ creator_thread_id_ = base::PlatformThread::CurrentId();
}
~ChromeFrameMetricsDataUploader() {
DVLOG(1) << __FUNCTION__;
- DCHECK(creator_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(creator_thread_id_ == base::PlatformThread::CurrentId());
}
virtual void OnFinalMessage(HWND wnd) {
@@ -350,7 +350,7 @@ class ChromeFrameMetricsDataUploader
private:
URLFetcher* fetcher_;
- PlatformThreadId creator_thread_id_;
+ base::PlatformThreadId creator_thread_id_;
};
MetricsService* MetricsService::GetInstance() {
@@ -383,7 +383,7 @@ MetricsService::~MetricsService() {
void MetricsService::InitializeMetricsState() {
DCHECK(state_ == INITIALIZED);
- thread_ = PlatformThread::CurrentId();
+ thread_ = base::PlatformThread::CurrentId();
user_permits_upload_ = GoogleUpdateSettings::GetCollectStatsConsent();
// Update session ID
@@ -480,7 +480,7 @@ void CALLBACK MetricsService::TransmissionTimerProc(HWND window,
void MetricsService::SetReporting(bool enable) {
static const int kChromeFrameMetricsTimerId = 0xFFFFFFFF;
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (reporting_active_ != enable) {
reporting_active_ = enable;
if (reporting_active_) {
@@ -498,7 +498,7 @@ void MetricsService::SetReporting(bool enable) {
// Recording control methods
void MetricsService::StartRecording() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (current_log_)
return;
@@ -509,7 +509,7 @@ void MetricsService::StartRecording() {
}
void MetricsService::StopRecording(bool save_log) {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (!current_log_)
return;
@@ -527,7 +527,7 @@ void MetricsService::StopRecording(bool save_log) {
}
void MetricsService::MakePendingLog() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (pending_log())
return;
@@ -556,7 +556,7 @@ bool MetricsService::TransmissionPermitted() const {
}
std::string MetricsService::PrepareLogSubmissionString() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
MakePendingLog();
DCHECK(pending_log());
@@ -572,7 +572,7 @@ std::string MetricsService::PrepareLogSubmissionString() {
}
bool MetricsService::UploadData() {
- DCHECK_EQ(thread_, PlatformThread::CurrentId());
+ DCHECK_EQ(thread_, base::PlatformThread::CurrentId());
if (!GetInstance()->TransmissionPermitted())
return false;
diff --git a/chrome_frame/metrics_service.h b/chrome_frame/metrics_service.h
index 5976c18..46f39ed 100644
--- a/chrome_frame/metrics_service.h
+++ b/chrome_frame/metrics_service.h
@@ -15,8 +15,8 @@
#include "base/lazy_instance.h"
#include "base/lock.h"
#include "base/metrics/histogram.h"
-#include "base/platform_thread.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "base/threading/thread_local.h"
#include "chrome/common/metrics_helpers.h"
@@ -139,7 +139,7 @@ class MetricsService : public MetricsServiceBase {
// A number that identifies the how many times the app has been launched.
int session_id_;
- PlatformThreadId thread_;
+ base::PlatformThreadId thread_;
// Indicates if this is the first uma upload from this instance.
bool initial_uma_upload_;
diff --git a/chrome_frame/npapi_url_request.cc b/chrome_frame/npapi_url_request.cc
index 1d57065..0a28cdd 100644
--- a/chrome_frame/npapi_url_request.cc
+++ b/chrome_frame/npapi_url_request.cc
@@ -5,6 +5,7 @@
#include "chrome_frame/npapi_url_request.h"
#include "base/string_number_conversions.h"
+#include "base/threading/platform_thread.h"
#include "chrome_frame/np_browser_functions.h"
#include "chrome_frame/np_utils.h"
#include "net/base/net_errors.h"
@@ -44,7 +45,7 @@ class NPAPIUrlRequest : public PluginUrlRequest {
size_t pending_read_size_;
URLRequestStatus status_;
- PlatformThreadId thread_;
+ base::PlatformThreadId thread_;
static int instance_count_;
DISALLOW_COPY_AND_ASSIGN(NPAPIUrlRequest);
};
@@ -55,7 +56,7 @@ NPAPIUrlRequest::NPAPIUrlRequest(NPP instance)
: ref_count_(0), instance_(instance), stream_(NULL),
pending_read_size_(0),
status_(URLRequestStatus::FAILED, net::ERR_FAILED),
- thread_(PlatformThread::CurrentId()) {
+ thread_(base::PlatformThread::CurrentId()) {
DVLOG(1) << "Created request. Count: " << ++instance_count_;
}
@@ -187,13 +188,13 @@ int NPAPIUrlRequest::OnWrite(void* buffer, int len) {
}
STDMETHODIMP_(ULONG) NPAPIUrlRequest::AddRef() {
- DCHECK_EQ(PlatformThread::CurrentId(), thread_);
+ DCHECK_EQ(base::PlatformThread::CurrentId(), thread_);
++ref_count_;
return ref_count_;
}
STDMETHODIMP_(ULONG) NPAPIUrlRequest::Release() {
- DCHECK_EQ(PlatformThread::CurrentId(), thread_);
+ DCHECK_EQ(base::PlatformThread::CurrentId(), thread_);
unsigned long ret = --ref_count_;
if (!ret)
delete this;
diff --git a/chrome_frame/npapi_url_request.h b/chrome_frame/npapi_url_request.h
index a257faf..cce1b88 100644
--- a/chrome_frame/npapi_url_request.h
+++ b/chrome_frame/npapi_url_request.h
@@ -8,7 +8,6 @@
#include <map>
#include <string>
-#include "base/platform_thread.h"
#include "chrome_frame/plugin_url_request.h"
#include "third_party/npapi/bindings/npapi.h"
diff --git a/chrome_frame/ns_isupports_impl.h b/chrome_frame/ns_isupports_impl.h
index 4873163..c60201f 100644
--- a/chrome_frame/ns_isupports_impl.h
+++ b/chrome_frame/ns_isupports_impl.h
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "base/platform_thread.h"
+#include "base/threading/platform_thread.h"
#include "chrome_frame/utils.h"
#include "third_party/xulrunner-sdk/win/include/xpcom/nscore.h"
#include "third_party/xulrunner-sdk/win/include/xpcom/nsid.h"
@@ -19,15 +19,15 @@ template<class Derived>
class NsISupportsImplBase {
public:
NsISupportsImplBase() : nsiimpl_ref_count_(0) {
- nsiimpl_thread_id_ = PlatformThread::CurrentId();
+ nsiimpl_thread_id_ = base::PlatformThread::CurrentId();
}
virtual ~NsISupportsImplBase() {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
}
NS_IMETHOD QueryInterface(REFNSIID iid, void** ptr) {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
nsresult res = NS_NOINTERFACE;
if (memcmp(&iid, &__uuidof(nsISupports), sizeof(nsIID)) == 0) {
@@ -40,13 +40,13 @@ class NsISupportsImplBase {
}
NS_IMETHOD_(nsrefcnt) AddRef() {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
nsiimpl_ref_count_++;
return nsiimpl_ref_count_;
}
NS_IMETHOD_(nsrefcnt) Release() {
- DCHECK(nsiimpl_thread_id_ == PlatformThread::CurrentId());
+ DCHECK(nsiimpl_thread_id_ == base::PlatformThread::CurrentId());
nsiimpl_ref_count_--;
if (!nsiimpl_ref_count_) {
diff --git a/chrome_frame/test/perf/run_all.cc b/chrome_frame/test/perf/run_all.cc
index 26c6e99..01dda7c 100644
--- a/chrome_frame/test/perf/run_all.cc
+++ b/chrome_frame/test/perf/run_all.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/platform_thread.h"
#include "base/test/perf_test_suite.h"
#include "base/scoped_ptr.h"
+#include "base/threading/platform_thread.h"
#include "chrome/common/chrome_paths.h"
#include "chrome_frame/test/chrome_frame_test_utils.h"
#include "chrome_frame/test_utils.h"
@@ -13,7 +13,7 @@
int main(int argc, char **argv) {
base::PerfTestSuite perf_suite(argc, argv);
chrome::RegisterPathProvider();
- PlatformThread::SetName("ChromeFrame perf tests");
+ base::PlatformThread::SetName("ChromeFrame perf tests");
SetConfigBool(kChromeFrameHeadlessMode, true);
SetConfigBool(kChromeFrameUnpinnedMode, true);