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

Side by Side Diff: chrome/browser/extensions/app_notification_manager.cc

Issue 9668028: [Sync] Create new top-level sync/ directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 9 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/extensions/app_notification_manager.h" 5 #include "chrome/browser/extensions/app_notification_manager.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/perftimer.h" 12 #include "base/perftimer.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/sync/protocol/app_notification_specifics.pb.h"
17 #include "chrome/browser/sync/protocol/sync.pb.h"
18 #include "chrome/common/chrome_notification_types.h" 16 #include "chrome/common/chrome_notification_types.h"
19 #include "chrome/common/extensions/extension.h" 17 #include "chrome/common/extensions/extension.h"
20 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
19 #include "sync/protocol/app_notification_specifics.pb.h"
20 #include "sync/protocol/sync.pb.h"
21 21
22 using content::BrowserThread; 22 using content::BrowserThread;
23 23
24 typedef std::map<std::string, SyncData> SyncDataMap; 24 typedef std::map<std::string, SyncData> SyncDataMap;
25 25
26 namespace { 26 namespace {
27 27
28 class GuidComparator 28 class GuidComparator
29 : public std::binary_function<linked_ptr<AppNotification>, 29 : public std::binary_function<linked_ptr<AppNotification>,
30 std::string, 30 std::string,
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 AppNotification* notification = new AppNotification( 544 AppNotification* notification = new AppNotification(
545 false, base::Time::FromInternalValue(specifics.creation_timestamp_ms()), 545 false, base::Time::FromInternalValue(specifics.creation_timestamp_ms()),
546 specifics.guid(), specifics.app_id(), 546 specifics.guid(), specifics.app_id(),
547 specifics.title(), specifics.body_text()); 547 specifics.title(), specifics.body_text());
548 if (specifics.has_link_text()) 548 if (specifics.has_link_text())
549 notification->set_link_text(specifics.link_text()); 549 notification->set_link_text(specifics.link_text());
550 if (specifics.has_link_url()) 550 if (specifics.has_link_url())
551 notification->set_link_url(GURL(specifics.link_url())); 551 notification->set_link_url(GURL(specifics.link_url()));
552 return notification; 552 return notification;
553 } 553 }
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/extensions/app_notification_manager_sync_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698