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

Unified Diff: chrome/browser/webdata/web_database_unittest.cc

Issue 5849001: Move GUID utils to src/chrome/common. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/web_database_unittest.cc
diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc
index dcae78764fe75648605de56a2f5c9ce19d511c94..1b50e2cf417fb7129e8d7d389acf81905085ac3f 100644
--- a/chrome/browser/webdata/web_database_unittest.cc
+++ b/chrome/browser/webdata/web_database_unittest.cc
@@ -10,6 +10,7 @@
#include <vector>
#include "app/sql/statement.h"
+#include "base/guid.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
@@ -22,7 +23,6 @@
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/autofill_type.h"
#include "chrome/browser/autofill/credit_card.h"
-#include "chrome/browser/guid.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/password_manager/encryptor.h"
#include "chrome/browser/webdata/autofill_change.h"
@@ -120,7 +120,7 @@ void AutoFillProfile31FromStatement(const sql::Statement& s,
profile->SetInfo(AutoFillType(PHONE_FAX_WHOLE_NUMBER), s.ColumnString16(14));
*date_modified = s.ColumnInt64(15);
profile->set_guid(s.ColumnString(16));
- EXPECT_TRUE(guid::IsValidGUID(profile->guid()));
+ EXPECT_TRUE(base::IsValidGUID(profile->guid()));
}
void AutoFillProfile32FromStatement(const sql::Statement& s,
@@ -131,7 +131,7 @@ void AutoFillProfile32FromStatement(const sql::Statement& s,
DCHECK(label);
DCHECK(date_modified);
profile->set_guid(s.ColumnString(0));
- EXPECT_TRUE(guid::IsValidGUID(profile->guid()));
+ EXPECT_TRUE(base::IsValidGUID(profile->guid()));
*label = s.ColumnString16(1);
profile->SetInfo(AutoFillType(NAME_FIRST), s.ColumnString16(2));
profile->SetInfo(AutoFillType(NAME_MIDDLE), s.ColumnString16(3));
@@ -175,7 +175,7 @@ void CreditCard31FromStatement(const sql::Statement& s,
}
*date_modified = s.ColumnInt64(12);
credit_card->set_guid(s.ColumnString(13));
- EXPECT_TRUE(guid::IsValidGUID(credit_card->guid()));
+ EXPECT_TRUE(base::IsValidGUID(credit_card->guid()));
}
void CreditCard32FromStatement(const sql::Statement& s,
@@ -188,7 +188,7 @@ void CreditCard32FromStatement(const sql::Statement& s,
DCHECK(encrypted_number);
DCHECK(date_modified);
credit_card->set_guid(s.ColumnString(0));
- EXPECT_TRUE(guid::IsValidGUID(credit_card->guid()));
+ EXPECT_TRUE(base::IsValidGUID(credit_card->guid()));
*label = s.ColumnString16(1);
credit_card->SetInfo(AutoFillType(CREDIT_CARD_NAME), s.ColumnString16(2));
credit_card->SetInfo(AutoFillType(CREDIT_CARD_EXP_MONTH),
@@ -1440,7 +1440,7 @@ TEST_F(WebDatabaseTest, AutoFillProfile) {
ASCIIToUTF16("5678 Bottom Street"));
billing_profile.SetInfo(AutoFillType(ADDRESS_HOME_LINE2),
ASCIIToUTF16("suite 3"));
- billing_profile.set_guid(guid::GenerateGUID());
+ billing_profile.set_guid(base::GenerateGUID());
pre_creation_time = Time::Now();
EXPECT_TRUE(db.AddAutoFillProfile(billing_profile));
@@ -1490,7 +1490,7 @@ TEST_F(WebDatabaseTest, AutoFillProfile) {
ASCIIToUTF16("5678 Top Street"));
guid_profile.SetInfo(AutoFillType(ADDRESS_HOME_LINE2),
ASCIIToUTF16("suite 4"));
- guid_profile.set_guid(guid::GenerateGUID());
+ guid_profile.set_guid(base::GenerateGUID());
EXPECT_TRUE(db.AddAutoFillProfile(guid_profile));
ASSERT_TRUE(db.GetAutoFillProfileForGUID(guid_profile.guid(),
@@ -2692,11 +2692,11 @@ TEST_F(WebDatabaseMigrationTest, MigrateVersion30ToCurrent) {
ASSERT_TRUE(s.Step());
std::string guid1 = s.ColumnString(0);
- EXPECT_TRUE(guid::IsValidGUID(guid1));
+ EXPECT_TRUE(base::IsValidGUID(guid1));
ASSERT_TRUE(s.Step());
std::string guid2 = s.ColumnString(0);
- EXPECT_TRUE(guid::IsValidGUID(guid2));
+ EXPECT_TRUE(base::IsValidGUID(guid2));
EXPECT_NE(guid1, guid2);
}

Powered by Google App Engine
This is Rietveld 408576698