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

Side by Side Diff: chrome/browser/profiles/profile_window_browsertest.cc

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/profiles/profile_window.h" 5 #include "chrome/browser/profiles/profile_window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 history::HistoryService* history = HistoryServiceFactory::GetForProfile( 80 history::HistoryService* history = HistoryServiceFactory::GetForProfile(
81 profile, ServiceAccessType::EXPLICIT_ACCESS); 81 profile, ServiceAccessType::EXPLICIT_ACCESS);
82 history->ScheduleDBTask(std::move(task), &task_tracker); 82 history->ScheduleDBTask(std::move(task), &task_tracker);
83 content::RunMessageLoop(); 83 content::RunMessageLoop();
84 } 84 }
85 85
86 class EmptyAcceleratorHandler : public ui::AcceleratorProvider { 86 class EmptyAcceleratorHandler : public ui::AcceleratorProvider {
87 public: 87 public:
88 // Don't handle accelerators. 88 // Don't handle accelerators.
89 bool GetAcceleratorForCommandId(int command_id, 89 bool GetAcceleratorForCommandId(int command_id,
90 ui::Accelerator* accelerator) override { 90 ui::Accelerator* accelerator) const override {
91 return false; 91 return false;
92 } 92 }
93 }; 93 };
94 94
95 base::FilePath CreateTestingProfile(const std::string& name, 95 base::FilePath CreateTestingProfile(const std::string& name,
96 const std::string& relative_path) { 96 const std::string& relative_path) {
97 ProfileManager* manager = g_browser_process->profile_manager(); 97 ProfileManager* manager = g_browser_process->profile_manager();
98 ProfileAttributesStorage& storage = manager->GetProfileAttributesStorage(); 98 ProfileAttributesStorage& storage = manager->GetProfileAttributesStorage();
99 size_t starting_number_of_profiles = storage.GetNumberOfProfiles(); 99 size_t starting_number_of_profiles = storage.GetNumberOfProfiles();
100 100
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 &url_to_test, 287 &url_to_test,
288 run_loop.QuitClosure())); 288 run_loop.QuitClosure()));
289 run_loop.Run(); 289 run_loop.Run();
290 290
291 ui_test_utils::NavigateToURL(browser(), GURL(url_to_test)); 291 ui_test_utils::NavigateToURL(browser(), GURL(url_to_test));
292 EXPECT_TRUE(RunJavascriptTest( 292 EXPECT_TRUE(RunJavascriptTest(
293 "testPodFocused", new base::StringValue(expected_path.AsUTF8Unsafe()))); 293 "testPodFocused", new base::StringValue(expected_path.AsUTF8Unsafe())));
294 } 294 }
295 295
296 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 296 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698