summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 01:08:45 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 01:08:45 +0000
commit3c5edd42af2fab481784f122d00d75a2c28661b7 (patch)
tree4f16bbc124afd331241fcd3ec935ea1a54fa8331 /chrome/browser/sync
parentaa84ef76e7ff3e9c3601408efa0b86b74d02793b (diff)
downloadchromium_src-3c5edd42af2fab481784f122d00d75a2c28661b7.zip
chromium_src-3c5edd42af2fab481784f122d00d75a2c28661b7.tar.gz
chromium_src-3c5edd42af2fab481784f122d00d75a2c28661b7.tar.bz2
Fix some warnings on Mac that are treated as errors:
The warnings indicate that a public/protected method of a class visible outside of a .cc file returns a type that's declared in the anonymous namespace in that file (and hence not visible outside the file). BUG=23073 TEST=none Review URL: http://codereview.chromium.org/273058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/engine/auth_watcher_unittest.cc18
-rw-r--r--chrome/browser/sync/engine/net/gaia_authenticator_unittest.cc11
-rw-r--r--chrome/browser/sync/engine/syncer_unittest.cc8
-rw-r--r--chrome/browser/sync/syncable/syncable.h1
-rw-r--r--chrome/browser/sync/syncable/syncable_unittest.cc3
5 files changed, 13 insertions, 28 deletions
diff --git a/chrome/browser/sync/engine/auth_watcher_unittest.cc b/chrome/browser/sync/engine/auth_watcher_unittest.cc
index b483e82..ede4023 100644
--- a/chrome/browser/sync/engine/auth_watcher_unittest.cc
+++ b/chrome/browser/sync/engine/auth_watcher_unittest.cc
@@ -32,14 +32,14 @@ static const char* kValidLSID = "validLSID";
static const char* kInvalidAuthToken = "invalidAuthToken";
static const char* kValidAuthToken = "validAuthToken";
-namespace {
+namespace browser_sync {
-class GaiaAuthMock : public browser_sync::GaiaAuthenticator {
+class GaiaAuthMockForAuthWatcher : public browser_sync::GaiaAuthenticator {
public:
- GaiaAuthMock() : browser_sync::GaiaAuthenticator(
+ GaiaAuthMockForAuthWatcher() : browser_sync::GaiaAuthenticator(
kTestUserAgent, kTestServiceId, kTestGaiaURL),
use_bad_auth_token_(false) {}
- virtual ~GaiaAuthMock() {}
+ virtual ~GaiaAuthMockForAuthWatcher() {}
void SendBadAuthTokenForNextRequest() { use_bad_auth_token_ = true; }
@@ -71,10 +71,6 @@ class GaiaAuthMock : public browser_sync::GaiaAuthenticator {
bool use_bad_auth_token_;
};
-} // namespace
-
-namespace browser_sync {
-
class AuthWatcherTest : public testing::Test {
public:
AuthWatcherTest() : metadb_(kUserDisplayEmail),
@@ -92,7 +88,7 @@ class AuthWatcherTest : public testing::Test {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
PathString user_settings_path = temp_dir_.path().value() + kUserSettingsDB;
user_settings_->Init(user_settings_path);
- gaia_auth_ = new GaiaAuthMock();
+ gaia_auth_ = new GaiaAuthMockForAuthWatcher();
talk_mediator_.reset(new TalkMediatorImpl());
auth_watcher_ = new AuthWatcher(metadb_.manager(), connection_.get(),
allstatus_.get(), kTestUserAgent, kTestServiceId, kTestGaiaURL,
@@ -127,7 +123,7 @@ class AuthWatcherTest : public testing::Test {
AuthWatcher* auth_watcher() { return auth_watcher_.get(); }
MockConnectionManager* connection() { return connection_.get(); }
- GaiaAuthMock* gaia_auth() { return gaia_auth_; }
+ GaiaAuthMockForAuthWatcher* gaia_auth() { return gaia_auth_; }
const std::string& user_email() { return user_email_; }
private:
@@ -142,7 +138,7 @@ class AuthWatcherTest : public testing::Test {
scoped_ptr<MockConnectionManager> connection_;
scoped_ptr<AllStatus> allstatus_;
scoped_ptr<UserSettings> user_settings_;
- GaiaAuthMock* gaia_auth_; // Owned by auth_watcher_.
+ GaiaAuthMockForAuthWatcher* gaia_auth_; // Owned by auth_watcher_.
scoped_ptr<TalkMediator> talk_mediator_;
scoped_refptr<AuthWatcher> auth_watcher_;
diff --git a/chrome/browser/sync/engine/net/gaia_authenticator_unittest.cc b/chrome/browser/sync/engine/net/gaia_authenticator_unittest.cc
index 584e4d9..e4ef2df 100644
--- a/chrome/browser/sync/engine/net/gaia_authenticator_unittest.cc
+++ b/chrome/browser/sync/engine/net/gaia_authenticator_unittest.cc
@@ -17,12 +17,11 @@ namespace browser_sync {
class GaiaAuthenticatorTest : public testing::Test { };
-class GaiaAuthMock : public GaiaAuthenticator {
+class GaiaAuthMockForGaiaAuthenticator : public GaiaAuthenticator {
public:
- GaiaAuthMock() : GaiaAuthenticator("useragent",
- "serviceid",
- "http://gaia_url") {}
- ~GaiaAuthMock() {}
+ GaiaAuthMockForGaiaAuthenticator()
+ : GaiaAuthenticator("useragent", "serviceid", "http://gaia_url") {}
+ ~GaiaAuthMockForGaiaAuthenticator() {}
protected:
bool Post(const GURL& url, const string& post_body,
unsigned long* response_code, string* response_body) {
@@ -33,7 +32,7 @@ class GaiaAuthMock : public GaiaAuthenticator {
};
TEST(GaiaAuthenticatorTest, TestNewlineAtEndOfAuthTokenRemoved) {
- GaiaAuthMock mock_auth;
+ GaiaAuthMockForGaiaAuthenticator mock_auth;
MessageLoop message_loop;
mock_auth.set_message_loop(&message_loop);
GaiaAuthenticator::AuthResults results;
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc
index e22cfe6..08ae1c1 100644
--- a/chrome/browser/sync/engine/syncer_unittest.cc
+++ b/chrome/browser/sync/engine/syncer_unittest.cc
@@ -4344,8 +4344,6 @@ TEST_F(SyncerTest, SingletonTagUpdates) {
}
}
-namespace {
-
class SyncerPositionUpdateTest : public SyncerTest {
public:
SyncerPositionUpdateTest() : next_update_id_(1), next_revision_(1) {}
@@ -4395,8 +4393,6 @@ class SyncerPositionUpdateTest : public SyncerTest {
DISALLOW_COPY_AND_ASSIGN(SyncerPositionUpdateTest);
};
-} // namespace
-
TEST_F(SyncerPositionUpdateTest, InOrderPositive) {
// Add a bunch of items in increasing order, starting with just positive
// position values.
@@ -4462,8 +4458,6 @@ TEST_F(SyncerPositionUpdateTest, RandomOrderInBatches) {
ExpectLocalItemsInServerOrder();
}
-namespace {
-
class SyncerPositionTiebreakingTest : public SyncerTest {
public:
SyncerPositionTiebreakingTest()
@@ -4518,8 +4512,6 @@ class SyncerPositionTiebreakingTest : public SyncerTest {
DISALLOW_COPY_AND_ASSIGN(SyncerPositionTiebreakingTest);
};
-} // namespace
-
TEST_F(SyncerPositionTiebreakingTest, LowMidHigh) {
Add(low_id_);
Add(mid_id_);
diff --git a/chrome/browser/sync/syncable/syncable.h b/chrome/browser/sync/syncable/syncable.h
index 9e55348..5c6195e 100644
--- a/chrome/browser/sync/syncable/syncable.h
+++ b/chrome/browser/sync/syncable/syncable.h
@@ -839,7 +839,6 @@ class Directory {
friend class ScopedKernelLock;
friend class ScopedKernelUnlock;
friend class WriteTransaction;
- friend class TestUnsaveableDirectory;
public:
// Various data that the Directory::Kernel we are backing (persisting data
// for) needs saved across runs of the application.
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index 517c751..f117aaf 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -1113,8 +1113,6 @@ TEST(Syncable, PathNameMatch) {
}
#endif // OS_WIN
-} // namespace
-
void FakeSync(MutableEntry* e, const char* fake_id) {
e->Put(IS_UNSYNCED, false);
e->Put(BASE_VERSION, 2);
@@ -1141,4 +1139,5 @@ TEST_F(SyncableDirectoryTest, Bug1509232) {
dir_.get()->SaveChanges();
}
+} // namespace
} // namespace syncable