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

Side by Side Diff: chrome/browser/chromeos/drive/test_util.cc

Issue 16628003: drive: Remove FileCacheObserver::OnCacheCommitted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/chromeos/drive/test_util.h" 5 #include "chrome/browser/chromeos/drive/test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // Mark dirty. 128 // Mark dirty.
129 if (resources[i].is_dirty) { 129 if (resources[i].is_dirty) {
130 FileError error = FILE_ERROR_OK; 130 FileError error = FILE_ERROR_OK;
131 cache->MarkDirtyOnUIThread( 131 cache->MarkDirtyOnUIThread(
132 resources[i].resource_id, 132 resources[i].resource_id,
133 resources[i].md5, 133 resources[i].md5,
134 google_apis::test_util::CreateCopyResultCallback(&error)); 134 google_apis::test_util::CreateCopyResultCallback(&error));
135 google_apis::test_util::RunBlockingPoolTask(); 135 google_apis::test_util::RunBlockingPoolTask();
136 if (error != FILE_ERROR_OK) 136 if (error != FILE_ERROR_OK)
137 return false; 137 return false;
138
139 cache->CommitDirtyOnUIThread(
140 resources[i].resource_id,
141 resources[i].md5,
142 google_apis::test_util::CreateCopyResultCallback(&error));
143 google_apis::test_util::RunBlockingPoolTask();
144 if (error != FILE_ERROR_OK)
145 return false;
146 } 138 }
147 } 139 }
148 return true; 140 return true;
149 } 141 }
150 142
151 } // namespace test_util 143 } // namespace test_util
152 } // namespace drive 144 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698