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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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/bookmarks/bookmark_storage.h" 5 #include "chrome/browser/bookmarks/bookmark_storage.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 BookmarkLoadDetails::~BookmarkLoadDetails() { 105 BookmarkLoadDetails::~BookmarkLoadDetails() {
106 } 106 }
107 107
108 // BookmarkStorage ------------------------------------------------------------- 108 // BookmarkStorage -------------------------------------------------------------
109 109
110 BookmarkStorage::BookmarkStorage(content::BrowserContext* context, 110 BookmarkStorage::BookmarkStorage(content::BrowserContext* context,
111 BookmarkModel* model) 111 BookmarkModel* model)
112 : model_(model), 112 : model_(model),
113 writer_(context->GetPath().Append(chrome::kBookmarksFileName), 113 writer_(context->GetPath().Append(chrome::kBookmarksFileName),
114 BrowserThread::GetMessageLoopProxyForThread( 114 BrowserThread::GetMessageLoopProxyForThread(
115 BrowserThread::FILE)) { 115 BrowserThread::FILE).get()) {
116 writer_.set_commit_interval(base::TimeDelta::FromMilliseconds(kSaveDelayMS)); 116 writer_.set_commit_interval(base::TimeDelta::FromMilliseconds(kSaveDelayMS));
117 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 117 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
118 base::Bind(&BackupCallback, writer_.path())); 118 base::Bind(&BackupCallback, writer_.path()));
119 } 119 }
120 120
121 BookmarkStorage::~BookmarkStorage() { 121 BookmarkStorage::~BookmarkStorage() {
122 if (writer_.HasPendingWrite()) 122 if (writer_.HasPendingWrite())
123 writer_.DoScheduledWrite(); 123 writer_.DoScheduledWrite();
124 } 124 }
125 125
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 NOTREACHED(); 165 NOTREACHED();
166 return false; 166 return false;
167 } 167 }
168 168
169 std::string data; 169 std::string data;
170 if (!SerializeData(&data)) 170 if (!SerializeData(&data))
171 return false; 171 return false;
172 writer_.WriteNow(data); 172 writer_.WriteNow(data);
173 return true; 173 return true;
174 } 174 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | chrome/browser/browsing_data/browsing_data_file_system_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698