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

Side by Side Diff: chrome/browser/webdata/autofill_profile_syncable_service.cc

Issue 10540003: Move guid generation from chrome/common/ to base/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: installer Created 8 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" 5 #include "chrome/browser/webdata/autofill_profile_syncable_service.h"
6 6
7 #include "base/guid.h"
7 #include "base/location.h" 8 #include "base/location.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autofill/autofill_profile.h" 11 #include "chrome/browser/autofill/autofill_profile.h"
11 #include "chrome/browser/autofill/form_group.h" 12 #include "chrome/browser/autofill/form_group.h"
12 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/webdata/autofill_table.h" 14 #include "chrome/browser/webdata/autofill_table.h"
14 #include "chrome/browser/webdata/web_data_service.h" 15 #include "chrome/browser/webdata/web_data_service.h"
15 #include "chrome/browser/webdata/web_database.h" 16 #include "chrome/browser/webdata/web_database.h"
16 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
17 #include "chrome/common/guid.h"
18 #include "content/public/browser/browser_thread.h" 18 #include "content/public/browser/browser_thread.h"
19 #include "content/public/browser/notification_details.h" 19 #include "content/public/browser/notification_details.h"
20 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
21 #include "sync/api/sync_error.h" 21 #include "sync/api/sync_error.h"
22 #include "sync/api/sync_error_factory.h" 22 #include "sync/api/sync_error_factory.h"
23 #include "sync/protocol/sync.pb.h" 23 #include "sync/protocol/sync.pb.h"
24 24
25 using content::BrowserThread; 25 using content::BrowserThread;
26 26
27 namespace { 27 namespace {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 return diff; 308 return diff;
309 } 309 }
310 310
311 // static 311 // static
312 void AutofillProfileSyncableService::WriteAutofillProfile( 312 void AutofillProfileSyncableService::WriteAutofillProfile(
313 const AutofillProfile& profile, 313 const AutofillProfile& profile,
314 sync_pb::EntitySpecifics* profile_specifics) { 314 sync_pb::EntitySpecifics* profile_specifics) {
315 sync_pb::AutofillProfileSpecifics* specifics = 315 sync_pb::AutofillProfileSpecifics* specifics =
316 profile_specifics->mutable_autofill_profile(); 316 profile_specifics->mutable_autofill_profile();
317 317
318 DCHECK(guid::IsValidGUID(profile.guid())); 318 DCHECK(base::IsValidGUID(profile.guid()));
319 319
320 // Reset all multi-valued fields in the protobuf. 320 // Reset all multi-valued fields in the protobuf.
321 specifics->clear_name_first(); 321 specifics->clear_name_first();
322 specifics->clear_name_middle(); 322 specifics->clear_name_middle();
323 specifics->clear_name_last(); 323 specifics->clear_name_last();
324 specifics->clear_email_address(); 324 specifics->clear_email_address();
325 specifics->clear_phone_home_whole_number(); 325 specifics->clear_phone_home_whole_number();
326 326
327 specifics->set_guid(profile.guid()); 327 specifics->set_guid(profile.guid());
328 std::vector<string16> values; 328 std::vector<string16> values;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } 516 }
517 517
518 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { 518 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const {
519 return web_data_service_->GetDatabase()->GetAutofillTable(); 519 return web_data_service_->GetDatabase()->GetAutofillTable();
520 } 520 }
521 521
522 AutofillProfileSyncableService::DataBundle::DataBundle() {} 522 AutofillProfileSyncableService::DataBundle::DataBundle() {}
523 523
524 AutofillProfileSyncableService::DataBundle::~DataBundle() { 524 AutofillProfileSyncableService::DataBundle::~DataBundle() {
525 } 525 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/autocomplete_syncable_service.cc ('k') | chrome/browser/webdata/autofill_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698