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

Side by Side Diff: chrome/browser/extensions/api/bookmarks/bookmarks_api.cc

Issue 490123003: Move bookmark_pref_names.* into bookmarks namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 6 years, 3 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
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "chrome/browser/extensions/api/bookmarks/bookmarks_api.h" 7 #include "chrome/browser/extensions/api/bookmarks/bookmarks_api.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (!node) { 248 if (!node) {
249 error_ = keys::kNoNodeError; 249 error_ = keys::kNoNodeError;
250 return NULL; 250 return NULL;
251 } 251 }
252 252
253 return node; 253 return node;
254 } 254 }
255 255
256 bool BookmarksFunction::EditBookmarksEnabled() { 256 bool BookmarksFunction::EditBookmarksEnabled() {
257 PrefService* prefs = user_prefs::UserPrefs::Get(GetProfile()); 257 PrefService* prefs = user_prefs::UserPrefs::Get(GetProfile());
258 if (prefs->GetBoolean(prefs::kEditBookmarksEnabled)) 258 if (prefs->GetBoolean(::bookmarks::prefs::kEditBookmarksEnabled))
259 return true; 259 return true;
260 error_ = keys::kEditBookmarksDisabled; 260 error_ = keys::kEditBookmarksDisabled;
261 return false; 261 return false;
262 } 262 }
263 263
264 bool BookmarksFunction::CanBeModified(const BookmarkNode* node) { 264 bool BookmarksFunction::CanBeModified(const BookmarkNode* node) {
265 if (!node) { 265 if (!node) {
266 error_ = keys::kNoParentError; 266 error_ = keys::kNoParentError;
267 return false; 267 return false;
268 } 268 }
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 906 }
907 907
908 void BookmarksExportFunction::FileSelected(const base::FilePath& path, 908 void BookmarksExportFunction::FileSelected(const base::FilePath& path,
909 int index, 909 int index,
910 void* params) { 910 void* params) {
911 bookmark_html_writer::WriteBookmarks(GetProfile(), path, NULL); 911 bookmark_html_writer::WriteBookmarks(GetProfile(), path, NULL);
912 Release(); // Balanced in BookmarksIOFunction::SelectFile() 912 Release(); // Balanced in BookmarksIOFunction::SelectFile()
913 } 913 }
914 914
915 } // namespace extensions 915 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc ('k') | chrome/browser/importer/profile_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698