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

Side by Side Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 63153003: mac: Prepare for -Wunused-functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/history_ui.cc ('k') | chrome/browser/usb/usb_device.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/webui/options/manage_profile_handler.h" 5 #include "chrome/browser/ui/webui/options/manage_profile_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Given |args| from the WebUI, parses value 0 as a FilePath |profile_file_path| 55 // Given |args| from the WebUI, parses value 0 as a FilePath |profile_file_path|
56 // and returns true on success. 56 // and returns true on success.
57 bool GetProfilePathFromArgs(const ListValue* args, 57 bool GetProfilePathFromArgs(const ListValue* args,
58 base::FilePath* profile_file_path) { 58 base::FilePath* profile_file_path) {
59 const Value* file_path_value; 59 const Value* file_path_value;
60 if (!args->Get(0, &file_path_value)) 60 if (!args->Get(0, &file_path_value))
61 return false; 61 return false;
62 return base::GetValueAsFilePath(*file_path_value, profile_file_path); 62 return base::GetValueAsFilePath(*file_path_value, profile_file_path);
63 } 63 }
64 64
65 void OnNewDefaultProfileCreated(
66 chrome::HostDesktopType desktop_type,
67 Profile* profile,
68 Profile::CreateStatus status) {
69 if (status == Profile::CREATE_STATUS_INITIALIZED) {
70 profiles::FindOrCreateNewWindowForProfile(
71 profile,
72 chrome::startup::IS_PROCESS_STARTUP,
73 chrome::startup::IS_FIRST_RUN,
74 desktop_type,
75 false);
76 }
77 }
78
79 } // namespace 65 } // namespace
80 66
81 ManageProfileHandler::ManageProfileHandler() 67 ManageProfileHandler::ManageProfileHandler()
82 : weak_factory_(this) { 68 : weak_factory_(this) {
83 } 69 }
84 70
85 ManageProfileHandler::~ManageProfileHandler() { 71 ManageProfileHandler::~ManageProfileHandler() {
86 ProfileSyncService* service = 72 ProfileSyncService* service =
87 ProfileSyncServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); 73 ProfileSyncServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()));
88 // Sync may be disabled in tests. 74 // Sync may be disabled in tests.
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 g_browser_process->profile_manager()->profile_shortcut_manager(); 480 g_browser_process->profile_manager()->profile_shortcut_manager();
495 DCHECK(shortcut_manager); 481 DCHECK(shortcut_manager);
496 482
497 shortcut_manager->RemoveProfileShortcuts(profile_file_path); 483 shortcut_manager->RemoveProfileShortcuts(profile_file_path);
498 484
499 // Update the UI buttons. 485 // Update the UI buttons.
500 OnHasProfileShortcuts(false); 486 OnHasProfileShortcuts(false);
501 } 487 }
502 488
503 } // namespace options 489 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/history_ui.cc ('k') | chrome/browser/usb/usb_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698