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

Side by Side Diff: chrome/browser/chromeos/drive/change_list_processor.h

Issue 12588009: drive: Pass through AboutResouce from server among callbacks in ChangeListLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/scoped_vector.h" 15 #include "base/memory/scoped_vector.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "chrome/browser/chromeos/drive/drive_file_error.h" 17 #include "chrome/browser/chromeos/drive/drive_file_error.h"
18 #include "chrome/browser/google_apis/drive_api_parser.h"
18 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
19 20
20 namespace google_apis { 21 namespace google_apis {
21 class ResourceList; 22 class ResourceList;
22 } // google_apis 23 } // google_apis
23 24
24 namespace drive { 25 namespace drive {
25 26
26 class DriveEntryProto; 27 class DriveEntryProto;
27 class DriveResourceMetadata; 28 class DriveResourceMetadata;
(...skipping 17 matching lines...) Expand all
45 // root feed (false) or a delta feed (true). 46 // root feed (false) or a delta feed (true).
46 // 47 //
47 // In the case of processing the root feeds |root_feed_changestamp| is used 48 // In the case of processing the root feeds |root_feed_changestamp| is used
48 // as its initial changestamp value. The value comes from 49 // as its initial changestamp value. The value comes from
49 // google_apis::AccountMetadata. 50 // google_apis::AccountMetadata.
50 // |on_complete_callback| is run after the feed is applied. 51 // |on_complete_callback| is run after the feed is applied.
51 // |on_complete_callback| must not be null. 52 // |on_complete_callback| must not be null.
52 // TODO(achuith): Change the type of on_complete_callback to 53 // TODO(achuith): Change the type of on_complete_callback to
53 // FileOperationCallback instead. 54 // FileOperationCallback instead.
54 void ApplyFeeds( 55 void ApplyFeeds(
56 scoped_ptr<google_apis::AboutResource> about_resource,
55 const ScopedVector<google_apis::ResourceList>& feed_list, 57 const ScopedVector<google_apis::ResourceList>& feed_list,
56 bool is_delta_feed, 58 bool is_delta_feed,
57 int64 root_feed_changestamp,
58 const base::Closure& on_complete_callback); 59 const base::Closure& on_complete_callback);
59 60
60 // Converts list of document feeds from collected feeds into a 61 // Converts list of document feeds from collected feeds into a
61 // DriveEntryProtoMap. |feed_changestamp| and/or |uma_stats| may be NULL. 62 // DriveEntryProtoMap. |feed_changestamp| and/or |uma_stats| may be NULL.
62 // entry_proto_map_ and root_upload_url_ are updated as side effects. 63 // entry_proto_map_ and root_upload_url_ are updated as side effects.
63 void FeedToEntryProtoMap( 64 void FeedToEntryProtoMap(
64 const ScopedVector<google_apis::ResourceList>& feed_list, 65 const ScopedVector<google_apis::ResourceList>& feed_list,
65 int64* feed_changestamp, 66 int64* feed_changestamp,
66 ChangeListToEntryProtoMapUMAStats* uma_stats); 67 ChangeListToEntryProtoMapUMAStats* uma_stats);
67 68
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 // Note: This should remain the last member so it'll be destroyed and 174 // Note: This should remain the last member so it'll be destroyed and
174 // invalidate its weak pointers before any other members are destroyed. 175 // invalidate its weak pointers before any other members are destroyed.
175 base::WeakPtrFactory<ChangeListProcessor> weak_ptr_factory_; 176 base::WeakPtrFactory<ChangeListProcessor> weak_ptr_factory_;
176 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor); 177 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor);
177 }; 178 };
178 179
179 } // namespace drive 180 } // namespace drive
180 181
181 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ 182 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_loader.cc ('k') | chrome/browser/chromeos/drive/change_list_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698