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

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: Fix PinAndUnpin 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
« no previous file with comments | « chrome/browser/chromeos/drive/sync_client_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Mark dirty. 130 // Mark dirty.
131 if (resources[i].is_dirty) { 131 if (resources[i].is_dirty) {
132 FileError error = FILE_ERROR_OK; 132 FileError error = FILE_ERROR_OK;
133 cache->MarkDirtyOnUIThread( 133 cache->MarkDirtyOnUIThread(
134 resources[i].resource_id, 134 resources[i].resource_id,
135 resources[i].md5, 135 resources[i].md5,
136 google_apis::test_util::CreateCopyResultCallback(&error)); 136 google_apis::test_util::CreateCopyResultCallback(&error));
137 google_apis::test_util::RunBlockingPoolTask(); 137 google_apis::test_util::RunBlockingPoolTask();
138 if (error != FILE_ERROR_OK) 138 if (error != FILE_ERROR_OK)
139 return false; 139 return false;
140
141 cache->CommitDirtyOnUIThread(
142 resources[i].resource_id,
143 resources[i].md5,
144 google_apis::test_util::CreateCopyResultCallback(&error));
145 google_apis::test_util::RunBlockingPoolTask();
146 if (error != FILE_ERROR_OK)
147 return false;
148 } 140 }
149 } 141 }
150 return true; 142 return true;
151 } 143 }
152 144
153 } // namespace test_util 145 } // namespace test_util
154 } // namespace drive 146 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/sync_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698