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

Side by Side Diff: chrome/browser/bookmarks/bookmark_storage.cc

Issue 6286038: Add initial code to do filename munging in the FileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/bookmarks/bookmark_storage.h" 5 #include "chrome/browser/bookmarks/bookmark_storage.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/file_util_proxy.h" 9 #include "base/file_util_proxy.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return; 223 return;
224 224
225 model_->DoneLoading(details_.release()); 225 model_->DoneLoading(details_.release());
226 226
227 if (path == tmp_history_path_) { 227 if (path == tmp_history_path_) {
228 // We just finished migration from history. Save now to new file, 228 // We just finished migration from history. Save now to new file,
229 // after the model is created and done loading. 229 // after the model is created and done loading.
230 SaveNow(); 230 SaveNow();
231 231
232 // Clean up after migration from history. 232 // Clean up after migration from history.
233 base::FileUtilProxy::Delete( 233 base::FileUtilProxy::GetInstance()->Delete(
234 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 234 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
235 tmp_history_path_, 235 tmp_history_path_,
236 false, 236 false,
237 NULL); 237 NULL);
238 } 238 }
239 } 239 }
240 240
241 void BookmarkStorage::Observe(NotificationType type, 241 void BookmarkStorage::Observe(NotificationType type,
242 const NotificationSource& source, 242 const NotificationSource& source,
243 const NotificationDetails& details) { 243 const NotificationDetails& details) {
(...skipping 15 matching lines...) Expand all
259 NOTREACHED(); 259 NOTREACHED();
260 return false; 260 return false;
261 } 261 }
262 262
263 std::string data; 263 std::string data;
264 if (!SerializeData(&data)) 264 if (!SerializeData(&data))
265 return false; 265 return false;
266 writer_.WriteNow(data); 266 writer_.WriteNow(data);
267 return true; 267 return true;
268 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698